oracle

Oracle Sql Developer vendor code 1317

Hi, I am using Oracle Sql Developer to browse a MySQL database. When I browse table with Columns tab(shows table definitions), some of tables will display an Error Encountered dialog that says: Vendor code 1317. Does anyone know how I can resolve this? Thanks, /Z ...

oracle hibernate + maven dependenciesm dbcp.basicdatasource exception

I'm trying to create a web application using maven, tomcat and hibernate. Now I'm getting a cannot find class for org.appache.commons.dbcp.basicdatasource for bean with name datasource... exception. Without the hibernate aspects it works fine, but if I add <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <pro...

Updating rows using "in" operator in "where" clause

Hi. I stumbled upon SQL behavior I don't understand. I needed to update several rows in a table at once; started with just finding them: SELECT * FROM some_table WHERE field1 IN (SELECT ...) This returned a selection of about 60 rows. Now I was pretty confident I got the subquery right, so I modified the first part only: UPDATE so...

Select from table and function

I have a function that returns a table. The returned table contains (among other things) a store_id. I can get the store_id for a particular transaction_id and city_id as follows: select store_id from table(user2.f_get_store(15, 12345)); --where 15 and 12345 are city_id and transation_id I have another table that contains a list of...

Major performance difference between two Oracle database instances

I am working with two instances of an Oracle database, call them one and two. two is running on better hardware (hard disk, memory, CPU) than one, and two is one minor version behind one in terms of Oracle version (both are 11g). Both have the exact same table table_name with exactly the same indexes defined. I load 500,000 identical row...

How to create a temporary table in Oracle

Hi I would like to create a temporary table in a Oracle database something like Declare table @table (int id) In SQL server And than populate it with a select statement Is it possible? Thanks ...

"FirstName" and "LastName" store in database USER or USER_PROFILE table?

Currently I store the user's "FirstName" and "LastName" in the USER table, but i also have a USER PROFILE table (which provides additional information about the user) and it would makes sense to have the user's "FirstName" and "LastName" in the USER PROFILE table aswell. So what do i do? make two copies of "FirstName" and "LastName"? ...

Query performance difference pl/sql forall insert and plain SQL insert

We have been using temporary table to store intermediate results in pl/sql Stored procedure. Could anyone tell if there is a performance difference between doing bulk collect insert through pl/sql and a plain SQL insert. Insert into [Table name] [Select query Returning huge amount of data] or Cursor for [Select query returning huge am...

After Trigger execute before constraint check in oracle

Hi, I have After Insert/Update trigger on Table T1 which get the referential data for Col1 from T2 and does some work and insert it into another table. The col1 is FK to Table T2. When user insert the incorrect or non existing value into the Col1 and if trigger is disabled I am getting constraint error that is fine. But when trigger is...

upload an m4a file in flex, saving it as a blob in oracle, and retrieving metadata info from it

Hi, I currently have a FileUpload.mxml component that uploads a .m4a to an oracle database, retrieves metadata from the file and saves the metadata info in the database. to acheive this I use FileReference() and set up, amoung others, the dispatcher.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, completeHandler); So the file is pos...

JDBC CallableStatement and Oracle SYS_REFCURSOR IN parameters?

Pretty much what it says in the title, how the hell is this supposed to be done? Basically i need to pass a null (empty?) ref cursor as an IN parameter to a stored procedure. /** spring's PreparedStatementSetter#setValues(...) */ public void setValues(PreparedStatement ps) throws SQLException { CallableStatement cs = (CallableState...

what is the main use of set home value in windows registry?

in windows registry there are keys for each application, for oracle i could see two home values each for oracle 9i & 10g, what DB home value would be eventually used during DB access by external application? ...

Sharing activerecord classes between oracle and ms sql server.

I have primary key sequence for oracle in my Castle ActiveRecord class: [PrimaryKey(PrimaryKeyType.SeqHiLo, "UserId", SequenceName = "users_seq")] public int Id { get; set; } Now i need to configure ActiveRecord to use Sql Server, but it does not support sequences, but it's not possible, since oracle-specific mapping is used. I don't...

Oracle intermediate join table size

When we join more than 2 tables, oracle or for that matter any database decides to join 2 tables and use the result to join with subsequent tables. Is there a way to identify the intermediate join size. I am particularly interested in oracle. One solution I know is to use Autotrace in sqldeveloper which has the column LAST_OUTPUT_ROWS. B...

How can I find the columns of a disabled index constraint?

For a normal index constraint, you can find the columns it is on by querying the all_ind_columns sysview using the index name in all_constraints. But if the constraint is disabled, no index exists, and there doesn't seem to be anywhere else that has constraint column information. How can I get the columns of a disabled index constraint f...

Oracle - Return shortest string value in a set of rows

I'm trying to write a query that returns the shortest string value in the column. For ex: if ColumnA has values ABCDE, ZXDR, ERC, the query should return "ERC". I've written the following query, but I'm wondering if there is any better way to do this? The query should return a single value. select distinct ColumnA from ( select Colum...

How to generate DELETE statements in PL/SQL, based on the tables FK relations?

Is it possible via script/tool to generate authomatically many delete statements based on the tables fk relations, using Oracle PL/SQL? In example: I have the table: CHICKEN (CHICKEN_CODE NUMBER) and there are 30 tables with fk references to its CHICKEN_CODE that I need to delete; there are also other 150 tables foreign-key-linked to th...

How do you execute Data Synchronizations between EPMA applications programmatically?

I would like to schedule a batch job in which a can execute a move of data between two workspace application in Hyperion Fusion Edition for Oracle. The tool provided is called 'Data Synchronization' This tool allows for this type if activity to occur upon request via the workspace environment. How might I do this automatically? I no...

Specifiy classpath for maven

Quite new to maven here so let me explain first what I am trying to do: We have certain JAR files which will not be added to the repo. This is because they are specific to Oracle ADF and are already placed on our application server. There is only 1 version to be used for all apps at anyone time. In order to compile though, we need to ha...

Create a trigger that updates a column on one table when a column in another table is updated

Hi, i have two tables Order(id, date, note) and Delivery(Id, Note, Date) I want to create a trigger that updates the date in Delivery when the date is updated in Order. I was thinking to do something like CREATE OR REPLACE TRIGGER your_trigger_name BEFORE UPDATE ON Order DECLARE BEGIN UPDATE Delivery set date = ??? where id = ...