oracle

% sign in Java's PreparedStatement

PreparedStatement ps = con.createStatement("select * from table1 where last_name like ?"); ps.setString(1, "'%"+lastName+"'"); Will this work the same as... Statement s = con.createStatement("select * from table1 where last_name like %"+ lastName); Or does PreparedStatement strip out the % sign? ...

Program version using the database?

Is it possible to get more information about the program using an Oracle database except from the exe-name? I would like to have the exes version number and/or hash code or something else that allows me to uniquely distinguish one exe-file-version from another. I don't necessary need to find this info in program code, an admin tool like...

How to wrap an Oracle stored procedure in a function that gets executed by a standard SELECT query?

I am following these steps, but I continue to get an error and don't see the issue: 1) Create a custom Oracle datatype that represents the database columns that you want to retrieve: CREATE TYPE my_object AS OBJECT (COL1 VARCHAR2(50), COL2 VARCHAR2(50), COL3 VARCHAR2(50)); 2) Create another datatype...

Best solution for Java web based forms connected to Oracle plus JNI?

Hi, My company is currently undergoing efforts to migrate from Informix to Oracle 10g. We don't want to use any form of oracle forms but instead want to create Java web based forms that interact with the Oracle db (these will replace our Informix forms). Some of the forms also need to implement some JNI to our underlying C code libraries...

populating a text box on a form - oracle

Hi, I am using application builder in oracle - and I have a create new record form for the opening times of a cinema. Basically at the moment I have it so you can put ina cinema id from a cinema table, but the problem is whith that you need to know the id - so its not very user friendly. I would like this id to be dynamically be put in ...

Oracle - How to grant to a user the rights to another user's objects

I need to give to user TARGETUSER the rights to select/insert/update to all tables of user SOURCEUSER (I can figure this all out from here) and the ability to run all their stored procedures. Basically, I wouldn't complain if I can give TARGETUSER the ability for all non-ddl activity with SOURCE_USER's objects. How do I do this? ...

oracle objects and collections

Just wanted to know if anyone is really using Objects and Collections in Oracle ? Is this something that should be avoided ? eg create type t_person as object ( id integer, first_name varchar2(30), last_name varchar2(30) ); ...

How to convert this t-sql script?

I am unfamiliar with Oracle and i need to have equivalent of my script for Oracle. Script: SELECT COL_NAME(parent_object_id, parent_column_id) AS ForigneKeyField, COL_NAME(referenced_object_id, referenced_column_id) AS PrimaryKeyField, OBJECT_NAME(referenced_object_id) AS PrimaryTable FROM sys.foreign_key_columns W...

How to protect a running column within Oracle/PostgreSQL (kind of MAX-result locking or something)

Hi, I'd need advice on following situation with Oracle/PostgreSQL: I have a db table with a "running counter" and would like to protect it in the following situation with two concurrent transactions: T1 T2 SELECT MAX(C) FROM TABLE WHERE CODE='xx' -- C for new : result + 1 SELECT MAX(C) FROM TABLE WHERE CODE='xx'; ...

describe query with oracle (.Net Connector)

I am using Oracle Express Edition and I want to get table information (column name,type,size,etc..) programmatically , inside my program (.Net C#, Microsoft oracle connector). In SqlPlus, when i give command "desc <tablename>" it works perfectly and print all information about table. Now i want to do it programmatically. I tried to giv...

Oracle Columns to Rows

In Oracle 9i and 10g how to transpose columns to rows and vice versa? ...

User Restriction for Schema

In Oracle 9i & 10g database my application shows these kind of error." The source DB Connection have access to multiple schemas. Restrict the access to required schema for the user.".How can i resolve? ...

Oracle versions

What are the version are available in oracle?.Which one is latest? ...

Why am i receiving a 255 Record insertion limit on Oracle 10g using DBExpress ?

I am hitting an brick wall during normal SQL processing, When connected to Oracle 10g from a remote client w/DBEXPRESS, - using the standard dbxpora.dll + oci.dll When in a transaction, after exactly 255 record insertions, the connection hangs for 30 seconds and returns the error: ORA-03114 (as if it lost the connection...) This h...

UnsatisifiedLinkError with ojdbc14.jar

Hi guys, I am trying to run some JUnit tests that connect to an Oracle database and whether a connection attempt is made. The following error is thrown: oracle/jdbc/driver/T2CConnection.t2cGetCharSet([CI[CI[CII[SLoracle/jdbc/driver/GetCharSetError;)S at oracle.jdbc.driver.T2CConnection.getCharSetIds(T2CConnection.java:2801) at oracle....

Accessing an OLAP data present in Oracle Cubes using C# .NET?

I am a newbie to ORACLE. I would like to access an OLAP cube in Oracle using C#. Could you please suggest efficient ways of doing the same? ...

Oracle - How to have an out ref cursor parameter in a stored procedure?

The standard way that our applications pass information from oracle stored procedures to the oracle .net provider is via an out ref cursor parameter. In the past all of our stored procedures used to be in packages and had something like this: CREATE OR REPLACE PACKAGE test_package IS TYPE refcur IS REF CURSOR; PROCEDURE get_info ...

Copying data between Oracle schemas using SQL

I'm trying to copy data from one Oracle schema (CORE_DATA) into another (MY_DATA) using an 'INSERT INTO (...)' SQL statement. What would the SQL statement look like? Thanks, ...

ORA-01031: insufficient privileges creating JMS connection to Oracle topic

One of my colleagues is having an issue creating a (non-durable) subscriber to an Oracle queue from Java. The queue is owned by one schema (say OWNER); he's trying to connect as another user (say SUBSCRIBER). SUBSCRIBER has been granted DEQUEUE privileges (and ENQUEUE, for what it's worth) by OWNER. When he creates the queue with the ...

Scripting out Oracle objects

I have recently been given an existing oracle database that i want to script out the various objects and its static data so that i can place the objects under source code control and when necessary rebuild the database from scratch. Does any one have any scripts or tools that i could look at to assist me. ...