Friday, January 18, 2013

Errors & Workaround



ORA-01591: lock held by in-doubt distributed transaction

solution:

SQL> select local_tran_id from dba_2pc_pending;

LOCAL_TRAN_ID
------------------------------------------------------------------
6.33.124689

SQL> rollback force '6.33.124689';

Rollback complete.

SQL> exec dbms_transaction.purge_lost_db_entry('6.33.124689');

PL/SQL procedure successfully completed.

SQL> select local_tran_id from dba_2pc_pending;

******************************************************************************

ERROR:
ORA-12534: TNS:operation not supported

Work around

set WALLET_LOCATION parameter in sqlnet.ora instead of ENCRYPTION_WALLET_LOCATION

*****************************************************************************

ORA-01017: invalid username/password; logon denied


[oracle@vm6 admin]$ sqlplus /@hat  ==>even if correct password

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jan 18 19:17:24 2013

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name:



Solution : Remove encryption from sqlnet.ora

Before (sqlnet.ora)

ENCRYPTION_WALLET_LOCATION =
 (SOURCE=
   (METHOD=file)
     (METHOD_DATA=
       (DIRECTORY=/u01/app/oracle/admin/hat/wallet)))

After:

[oracle@vm6 admin]$ cat sqlnet.ora
WALLET_LOCATION =
 (SOURCE=
   (METHOD=file)
     (METHOD_DATA=
       (DIRECTORY=/u01/app/oracle/admin/hat/wallet)))

SQLNET.WALLET_OVERRIDE=TRUE
[oracle@vm6 admin]$ sqlplus /@hat

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jan 18 19:20:14 2013

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL>
**********************************************************************

Error :

RMAN> register database;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 01/24/2013 21:34:10
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 01/24/2013 21:34:10
ORA-06502: PL/SQL: numeric or value error
                              
Solution :

Change the compatible parameter to 11.2.0.2 and try again
*************************************************************************************
Error:

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03008: error while performing automatic resync of recovery catalog
ORA-02291: integrity constraint (RMAN.RLH_F1) violated - parent key not found


Solution:


connect to catalog database and run

select 'EXEC DBMS_RCVCAT.UNREGISTERDATABASE('||DB_KEY||','||DBID||');'
 command, resetlogs_time
from rc_database
where name = '&db_name';


COMMAND                                                                                                                 RESETLOGS
------------------------------------------------------------------------------------------------------------ ---------
EXEC DBMS_RCVCAT.UNREGISTERDATABASE(110446,2179054324);                                                                 11-MAY-11


SQL> EXEC DBMS_RCVCAT.UNREGISTERDATABASE(110446,2179054324);

PL/SQL procedure successfully completed.

************************************************************************************************
Error:

P: [INS-40420] The current installation user is not the same as the installation owner of the existing Oracle Grid Infrastructure software.

Workaround:

While upgrading 10g RAC to 11gR2 RAC, GI(Grid Infrastructure) should be installed as existing 10g crs owner not grid user.


No comments: