Skip to main content

Posts

Showing posts from December, 2010

Temporary Tables

Creation Of Temporary Tables The data in a temporary table is private for the session that created it and can be session-specific or transaction-specific. If the data is to deleted at the end of the transaction the table should be defined as follows: CREATE GLOBAL TEMPORARY TABLE my_temp_table ( column1 NUMBER, column2 NUMBER ) ON COMMIT DELETE ROWS; If on the other hand that data should be preserved until the session ends it should be defined as follows: CREATE GLOBAL TEMPORARY TABLE my_temp_table ( column1 NUMBER, column2 NUMBER ) ON COMMIT PRESERVE ROWS; Export and Import utilities, TRUNCATE, Indexes, Views can be used with/on temporary tables

ORA-02290

check constraint (string.string) violated Cause: The values being inserted do not satisfy the named check constraint. Action: Do not insert values that violate the constraint.

ORA-02292

integrity constraint - violated - child record Cause: attempted to delete a parent key value that had a foreign key dependency. Action: delete dependencies first then parent or disable constraint.

ORA-24018

STOP_QUEUE on string failed, outstanding transactions found cause:-There were outstanding transactions on the queue, and WAIT was set to false, so STOP_QUEUE was unsucessful in stopping the queue. action:-1). Set WAIT to TRUE and try STOP_QUEUE again. It will hang till all outstanding transactions are completed. 2). If you want to stop the queue at once just kill the session using the queue table, and then stop the queue.For this you can take refernce:- kill session stop queue

ORA-00054

resource busy and acquire with NOWAIT specified cause:- Resource interested is busy. action:- Retry if necessary.or can kill the session using the resource by using the following reference killing session

Killing Sessions

Identify the Session to be Killed SET LINESIZE 100 COLUMN spid FORMAT A10 COLUMN username FORMAT A10 COLUMN program FORMAT A45 SELECT s.inst_id, s.sid, s.serial#, p.spid, s.username, s.program FROM gv$session s JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id WHERE s.type != 'BACKGROUND'; ALTER SYSTEM KILL SESSION SQL> ALTER SYSTEM KILL SESSION 'sid,serial#'; SQL> ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;

EXP-00009

no privilege to export string's table string Cause: An attempt was made to export another user's table. Only a database administrator can export another user's tables. Action: Ask your database administrator to do the export.

EXP-00002

EXP-00002: error in writing to export file EXP-00002: error in writing to export file EXP-00000: Export terminated unsuccessfully Cause: Export could not write to the export file, probably because of a device error. This message is usually followed by a device message from the operating system. Action: Take appropriate action to restore the device. This error is common when the expdp writing has filled the destination output file, as defined in the parfile. Check the output file name in your export parameter file, and see the space usage. This can also happen on 32-bit servers when the file size exceeds two gigabytes, requiring the use of the split command to separate the exp output onto multiple files.