oracle10g

oracle 10G shrink datafiles

how do i shrink datafiles in oracle 10G? ...

rebuild indexes oracle 10G

When i need run process for rebuild indexes and how i can know what indexes i need to rebuild ? ...

Insufficient privileges when creating a trigger for a table in another schema

When I try to create a trigger in schema A for a table located in schema B, I get an ora error : insufficient privileges. What privileges do I need? ...

Search all tables in Oracle DB

I am using Oracle 10g at the moment. I want to search through all the tables for a certain word or phrase. How would I go about searching all the tables for the word of phrase? Cheers ...

Using the results of a query in OPENQUERY

I have a SQL Server 2005 database that is linked to an Oracle database. What I want to do is run a query to pull some ID numbers out of it, then find out which ones are in Oracle. So I want to take the results of this query: SELECT pidm FROM sql_server_table And do something like this to query the Oracle database (assuming that the ...

ORA-28579: network error during callback from external procedure agent

Has anyone seen this error when trying to call an external C function from an Oracle query? I'm using Oracle 10g and get this error every time I try to call one of the two functions in the library. A call to the other function returns fine every time, though the function that works is all self-contained, no calls to any OCI* functions....

Jython, Query multiple columns dynamically

Hey all, I am working with a oracle database and Jython. I can get data pulled from the database no problem. results = statement.executeQuery("select %s from %s where column_id = '%s'", % (column, table, id)) This works fine if I want to pull one column of data. Say I wanted to loop threw a list like this: columns = ['column1', 'c...

Left outer join on two columns performance issue

I'm using a SQL query that is similar to the following form: SELECT col1, col2 FROM table1 LEFT OUTER JOIN table2 ON table1.person_uid = table2.person_uid AND table1.period = table2.period And it's either way too slow or something's deadlocking because it takes at least 4 minutes to return. If I were to change it to this: SELECT col...

Query/Where dialog in Oracle Forms 10g

In Oracle Forms 6i, you could enter query mode in your form, and type & or :A in a field, and when you executed the query, a Query/Where dialog box would open, allowing you to enter more complex query or sorting criteria than just entering data in the fields allows. This doesn't seem to work in Forms 10g: I get a "FRM-40367: Invalid Cri...

Is it ok to use oracle 11g client with a 10g server?

I am creating a .NET program that uses odp.net, specifically the 11g version. Our oracle server is running 10g. I am too late in the development process to make a change. Am I heading for trouble? Have you had any experience running 11g client against a 10g server? ...

Is it possible to kill a single query in oracle without killing the session?

I would like to be able to kill a user's query in Oracle 10.2.0.4 without killing their entire session. This would allow the query to end, but not log that user out of their session, so they can continue making other queries. Is this possible at all? Or is the blunt hammer of killing the session the only way to go about ending a query...

[Oracle SQL] Passing different (multiple) cursors to the same For Loop

Edited for better clarification: Added 1/28/09: I over simplified the code to make it easy to explain, but the select statements are very long and complicated, and the second one is dependent on the first meaning after the first cursor is done and looped through and the inserts are created the second select actually looks at the fir...

Oracle error with Data pump export

I am getting the following error. It doesn't happen to all the time, but once it starts, it won't stop. Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calling DBMS_METADATA.FETCH_XML_CLOB [] ORA-31642: the following SQL statement fails: BEGIN "...

Slow deletes from table with CLOB fields in Oracle 10g

I am encountering an issue where Oracle is very slow when I attempt to delete rows from a table which contains two CLOB fields. The table has millions of rows, no constraints, and the deletes are based on the Primary Key. I have rebuilt indexes and recomputed statistics, to no avail. What can I do to improve the performance of delete...

how to return rownum column value with HQL? (using oracle db)

I have a complicated HQL query. I would like to access the Oracle specific rownum column value as part of my returned results. How do I write my query (and/or change my hbm.xml) to support this? What I have tried so far does not work: modifying my hbm.xml <property name="rownum" type="int" update="false" insert="false" generated="ne...

SQL to return the rownum of a specific row? (using Oracle db)

In Oracle 10g, I have this SQL: select dog.id as dogId from CANINES dog order by dog.codename asc which returns: id -- 204 203 206 923 I want to extend this query to determine the oracle rownum of a dog.id in this resultset. I have tried select rownum from (select dog.id as dogId from CANINES dog order by dog.codename asc) wher...

How to troubleshoot Oracle database server errors?

My team inherited an Oracle-based web application and they are fairly inexperienced with Oracle database servers. The Oracle 10g server is running on a Windows 2003 Server with plenty of disk space and from time to time, all connectivity is lost, the application stops working, not even SQL Plus is able to connect to the database server....

Oracle Database 10g VIEW performance

Hello, I have a view in one of my Oracle Database that is taking too long to execute. When the statement runs, it does not seem to stop. Is there anyway that we can verify the performance of this view or how we can check to see if the statement session is 'hanging'? Thanks, N2EE UPDATE I realised that the issue is with the underlyin...

Ora 6531 Reference to uninitialized collection

create or replace function get_item_id ( p_folder_id LISTOFNUMBER_T ) return LISTOFNUMBER_T IS l_item_id LISTOFNUMBER_T; begin l_item_id LISTOFNUMBER_T := LISTOFNUMBER_T(); For i in p_folder_id.first..p_folder_id.last Loop select t.item_id into l_item_id(i) f...

How can I implement conditional inserting in Oracle?

I'm new to oracle and having a problem with one of my SQL Queries. There are 2 Users: User1 and User2: Tab1 Tab2 -------- -------- EmpNo EmpNo EmpName EmpName ContactNo Salary Location User2 has all privileges in User1.Tab1, and there is no f...