Skip to main content

Posts

Showing posts from 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.

ORA-01031

insufficient privileges Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges. When Trusted Oracle is configure in DBMS MAC, this error may occur if the user was granted the necessary privilege at a higher label than the current login. Action: Ask the database administrator to perform the operation or grant the required privileges. For Trusted Oracle users getting this error although granted the the appropriate privilege at a higher label, ask the database administrator to regrant the privilege at the appropriate label.

EXP-00091

Exporting questionable statistics Cause: Export was able to export statistics, but the statistics may not be useable. The statistics are questionable because one or more of the following happened during export: - A row error occurred, client character set or NCHARSET does not match with the server, a query clause was specified on export, - Only certain partitions or subpartitions were exported, or a fatal error occurred while processing a table. Action: To export non-questionable statistics, change the client character set or NCHARSET to match the server, export with no query clause, or export complete tables. If desired, import parameters can be supplied so that only non-questionable statistics will be imported, and all questionable statistics will be recalculated. or run the follwing query while exporting from database:- >exp username/psswd@orclservicename tables=table1,table2 file=c:/db_dump/db.dmp statistics=none; or >select VALUE 2 from nls_database_param

ORA-12203

TNS:unable to connect to destination cause:-Invalid address specified or destination is not listening. This error can also occur because of underlying network or network transport problems. action:-Verify that the net service name you entered was correct. Verify that the ADDRESS portion of the connect descriptor which corresponds to the net service name is correct. Ensure that the destination process (for example the listener) is running at the remote node.

ORA-12514

TNS:listener does not currently know of service requested in connect descriptor cause:-The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener. action:-- Wait a moment and try to connect a second time. - Check which services are currently known by the listener by executing: lsnrctl services - Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener. - If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener. - Check for an e

ORA-02019:

description:- connection description for remote database not found cause:- An attempt was made to connect or log in to a remote database using a connection description that could not be found.or name of Db link is not correct in query. Action:-Specify an existing database link. Query the data dictionary to see all existing database links. See your operating system-specific Net8 documentation for valid connection descriptors.or verify name of db link and name in the query and make changes accordingly

ORA-1545

Description : rollback segment string specified not available Error Cause: Either: 1) An attempt was made to bring a rollback segment online that is unavailable during startup; for example, the rollback segment is in an offline tablespace. 2) An attempt was made to bring a rollback segment online that is already online. This is because the rollback segment is specified twice in the ROLLBACK_SEGMENTS parameter in the initialization parameter file or the rollback segment is already online by another instance. 3) An attempt was made to drop a rollback segment that is currently online. 4) An attempt was made to alter a rollback segment that is currently online to use unlimited extents. 5) An attempt was made to online a rollback segment that is corrupted. This is because the rollback is specified in _corrupted_rollback_segments parameter in initialization parameter file. solution: Either: 1) Make the rollback segment available; for example, bring an offline tablespace online. 2) Remo

ORA-12541: TNS:no listener

CAUSE:- If DBlink(database link) is not properly configured.or                 the listener is not running.  REMEDIES:-Alter Dblink. or Start the Listener on the machine                     set ORACLE_HOME= cd %ORACLE_HOME%/bin                     lsnrctl start LISTENER                      > lsnrctl start