Skip to main content

Posts

Showing posts with the label ORACLE ERRORS

ORA-39168: Object path GRANT was not found EXCLUDE=GRANT

C:\Users\>sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 11 20:55:55 2013 Copyright (c) 1982, 2005, Oracle.  All rights reserved. Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production SQL> create user exp identified by exp; User created. SQL> create user imp identified by imp; User created. SQL> grant dba to exp; Grant succeeded. SQL> grant dba to imp; Grant succeeded. SQL> conn exp Enter password: Connected. SQL> SQL> create table Test (col1 char(10)); Table created. SQL> grant select on Test to rishi; Grant succeeded. SQL> insert into Test values('hello'); 1 row created. SQL> commit; Commit complete. NOTE:Directory already exists. So used the existng one SQL> select * from dba_directories; OWNER                          DIRECTORY_NAME ------------------------------ --------------------...

ORA-12519: TNS:no appropriate service handler found

Due to maximum number of sessions exceeded in XXXX database. Hence we have received the following error. ORA-12519: TNS:no appropriate service handler found Solution: Seems the number of processes parameter value less. Its unable to create new session. Because its reached maximum sessions. Please check like below. SQL> select * from v$resource_limit where RESOURCE_NAME in ('sessions','processes','transactions'); RESOURCE_NAME                  CURRENT_UTILIZATION      MAX_UTILIZATION         INITIAL_ALLOCATION             LIMIT_VALUE ----------------------         -------------------   ---------------------    -----------------------   ------------------------------ processes...

Process m000 died, see its trace file

Alert Log: [oracle@ bdump]$ view alert_HDRTG12.log Thu May 28 22:05:42 PDT 2015 Process P021 died, see its trace file Thu May 28 22:05:47 PDT 2015 Process m000 died, see its trace file Thu May 28 22:05:47 PDT 2015 ksvcreate: Process(m000) creation failed Thu May 28 22:06:00 PDT 2015 Process P021 died, see its trace file Thu May 28 22:06:10 PDT 2015 Process P021 died, see its trace file Thu May 28 22:06:43 PDT 2015 [oracle@bdump]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu May 28 23:38:59 2015 Copyright (c) 1982, 2010, Oracle.  All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select name from v$database; NAME --------------------------- HDRTG12 SQL> select * from v$resource_limit where RESOURCE_NAME in ('sessions','processes','transactions'); RESOURCE...

ORA-02449: unique/primary keys in table referenced by foreign keys

SQL> select name from v$database; NAME --------- UHTG1P SQL> drop tablespace TEST including contents and datafiles; drop tablespace TEST including contents and datafiles * ERROR at line 1: ORA-02449: unique/primary keys in table referenced by foreign keys SOLUTION 1: SQL> drop tablespace TEST including contents and datafiles cascade constraints; Tablespace dropped. NOTE: The CASCADE CONSTRAINTS clause drops all referential integrity constraints that refer to the primary and unique keys defined on the dropped columns. SOLUTION 2: Other way we can drop the user first and then the tablespace. No need to specify cascade option here. Thank You!

ORA-01502 Index or Partition of such index is in unusable state

NOTE > The problem usually happens when using the Direct Path for the SQL*Loader, Direct Load or DDL operations. This requires enough temporary space to build all indexes of the table. If there is no enough space in TEMP tablespace, all rows will still be loaded and imported, but the indexes are left with STATUS = ‘INVALID’. Check invalid indexes using the below query, connecting to SYS user. SQL > select owner, index_name from dba_indexes where status='UNUSABLE'; To check status of a specific index use the below query: SQL> select owner,index_name,table_name,status from dba_indexes where index_name='&index_name'; We can use the below query for rebuilding all the failed indexes in the database. Conn to sys and execute the below. SQL> SELECT 'ALTER INDEX '||OWNER||'.'||INDEX_NAME||' REBUILD;' FROM DBA_INDEXES WHERE STATUS = 'UNUSABLE'; Can unusable indexes using below parameter ' SKIP_UNUSABLE_INDEXE...

ORA-00031: session marked for kill

SQL> ALTER SYSTEM KILL SESSION '222, 18784 ' immediate; ALTER SYSTEM KILL SESSION ' 222, 18784 ' immediate * ERROR at line 1: ORA-00031: session marked for kill * Here the issue is in what this alter system kill command is doing.  * Alter System Kill command > It’s not actually killing the target session (like kill -9 would do for OS processes).  * It just sets a bit in the target sessions state object, which marks that the target session should end.  * But its entirely with the target session to check this bit and act on it. * All the kill session command is doing is ASK the target session to clean up and exit – via setting that bit. * The session trying to issue the kill will hang for 60 seconds and then return this “session marked for kill” message. And the target session does not get killed at all. * The “ORA-00031: session marked for kill” message you see after 60 seconds just means that: * Session marked for  “ki...

SQLException: ORA-02020: too many database links in use.

You can limit the number of connections from a user process to remote databases using the static initialization parameter OPEN_LINKS. This parameter controls the number of remote connections that a single user session can use concurrently in distributed transactions. If you are not sure how many database links are opened up concurrently by your session's database application, you can query v$dblink select in_transaction, count(*) from v$dblink group by in_transaction; To Increase the Database Links limit.  Follow the below. SQL> select name from v$database; NAME --------------------------- ORCL SQL> show parameter open_links; NAME                                 TYPE                                         value ------------------------------------ ----------------------...

Import Error - deadlock detected while trying to lock object TEST.CLIENT

Have received the below error while doing schema level refresh. ======================================================================== Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT ORA-39083: Object type REF_CONSTRAINT failed to create with error: ORA-04020: deadlock detected while trying to lock object TEST.CLIENT Failing sql is: ALTER TABLE "TEST"."TRANSACTION" ADD CONSTRAINT "TRANSACTION_FK" FOREIGN KEY ("LAST_UPDATED_BY_CLIENT_ID") REFERENCES "TEST"."CLIENT" ("CLIENT_ID") ENABLE; ======================================================================== First check for locked objects in the database. using the below queries. SQL> sqlplus / as sysdba ------------------------------------------------------------------------- SQL> select * from v$locked_object; no rows selected -------------...

ORA-01000 maximum open cursors exceeded

Cause: A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user. Action: Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle. Question: I keep encountering ORA-01000 and can't even create a table Answer: First, you should try increasing your OPEN_CURSORS and take a look at the application to see if/why cursors are staying open.  Here is an example from a forum: ALTER SYSTEM SET open_cursors = 400 SCOPE=BOTH; Furthermore, to resolve ORA-01000, try to close whatever cursors are no longer in use, raise the OPEN_CURSORS parameter within your initialization file, and restart Oracle. Resolving ORA-01000 try setting this OPEN_CURSORS to a higher number.  Keep in mind when resolving ORA-01000 in this way that changing this value in the proper way should not alter the system perfor...

ORA-39014: One or more workers have prematurely exited.ORA-00018: maximum number of sessions exceeded

ERROR: I was Performing a full database import and during the import I faced the below error. ORA-39014: One or more workers have prematurely exited. ORA-39029: worker 6 with process name "DW07" prematurely terminated ORA-31672: Worker process DW07 died unexpectedly. Job "SYSTEM"."SYS_IMPORT_FULL_04" stopped due to fatal error at 00:59:40 ORA-39014: One or more workers have prematurely exited. SOLUTION:  Run the import with fewer parallel processes, like PARALLEL=2 instead of 8. I was able to run the import successfully. NOTE 1: This errors occurs when there are less session allocation in the database. check the session,process parameters and increase them accordingly. To avoid such errors again. NOTE 2 : Note: Increasing processes parameter increases the amount of shared memory that needs to be reserved & the OS must be configured to support the larger amount of shared memory. So here we first need to increase the Memory & SG...

ORA-02354: Error in exporting/importing data

ERROR: Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 12.34 GB ORA-31693: Table data object "TEST"."TEST_SEAT" failed to load/unload and is being skipped due to error: ORA-02354: error in exporting/importing data ORA-01466: unable to read data - table definition has changed^@ SOLUTION: Wait for Some Time & start the export again. The Issue will get resloved.

ORA-01143: cannot disable media recovery - file 1 needs media recovery

I got a request from the client - To flashback the database to the existing restore point & disable flashback and archive log mode for database UATB. Here I came a cross error - ORA-01143. I followed the below steps. 1. SQL> select name from v$database; NAME ------------ UATB 2. SQL> SELECT NAME FROM V$RESTORE_POINT WHERE GUARANTEE_FLASHBACK_DATABASE='YES' ORDER BY TIME; NAME --------- UATB_COPY Here I'm going to restore the database to the above restore point. NOTE: The flashback database restore has to be done in MOUNT stage of the database. SQL> select name from v$database; NAME --------- UATB SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area  612368384 bytes Fixed Size                  1250428 bytes Variable Size             167775108 bytes ...

ORA-20000: Unable to set values for column TEST_COLUMN does not exist

Recently I faced the below error, while exporting & importing schema stats from Prod - Uat database. SQL> BEGIN dbms_stats.import_schema_stats  ('TESTU','TESTP_STATS'); END; * ERROR at line 1: ORA-20000: Unable to set values for column TEST_COLUMN: does not exist or insufficient privileges ORA-06512: at "SYS.DBMS_STATS", line 7346 ORA-06512: at "SYS.DBMS_STATS", line 7373 ORA-06512: at "SYS.DBMS_STATS", line 8038 ORA-06512: at line 1 SOLUTION: 1. First I have tried giving the ANALYZE permission to the user. GRANT ANALYZE ANY TO "SYSTEM"; But after giving the above permission, still that issue is not resloved. 2. Now I have tried deleting that column from the temporary stats table. Which will create as part of export & import stats. SQL> desc testp_stats;  Name                                      Null?    Type  -------------...