Tuesday, July 28, 2009

RMAN-00554: initialization of internal recovery manager package failed/RMAN-04005: error from target database:/ORA-01031: insufficient privileges


Platform: Oracle 10.2.0.3.0 on Windows 2003 server


*** Logged onto Windows 2003 server Local Windows user which is a member of Administrator and Ora_DBA group. Same database user is created into database and which is authenticated by OS.

Problem:
When try to connect RMAN for database backup following error happen.

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

d:\OPIS2005\ADMIN\SCRIPTS\com>set oracle_sid=POM

d:\OPIS2005\ADMIN\SCRIPTS\com>rman target /

Recovery Manager: Release 10.2.0.4.0 - Production on Tue Jul 28 15:05:33 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

RMAN-00571: =================================================
RMAN-00569: =========== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: =================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges


Logged on to the box with a local user that is a member of both thelocal Administrators group and the local ora_dba group.Connection to db with sqlplus, using local credentials:


d:\OPIS2005\ADMIN\SCRIPTS\com>sqlplus /

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 28 15:06:51 2009

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


Connected to:
Oracle Database 10g Release 10.2.0.3.0 - Production

POM: SQL>


But connecting to rman requires me to spell it out ...d:\OPIS2005\ADMIN\SCRIPTS\com>sqlplus /

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 28 15:06:51 2009

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


Connected to:
Oracle Database 10g Release 10.2.0.3.0 - Production

POM: SQL>
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

d:\OPIS2005\ADMIN\SCRIPTS\COM>rman target sys/manager1@lom.lhsc.world

Recovery Manager: Release 10.2.0.3.0 - Production on Tue Jul 28 15:10:13 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: LOM (DBID=2640997403)

RMAN>

*** Local Windows user is a member of Administrator and Ora_DBA group. Same database user is created into database and which is authenticated by OS.


Tried to connect as SYSDBA:
d:\opis2005\ADMIN\SCRIPTS\COM ( POM )sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 28 15:23:28 2009

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


Connected to:
Oracle Database 10g Release 10.2.0.3.0 - Production

POM: SQL>

So, things are correctly set up for connecting with local sysdbacredentials


SOLUTION:

We found 10g oem agent installed on same box in a different HOME.

The box had two Oracle homes on it, one for a single 10g datbase and one for the 10g oem agent. In the PATH environment variable, the agent home preceded the db home.

Example: C:\OracleHomes\agent10g\jlib;C:\OracleHomes\agent10g\bin;D:\oracle\product\10.2.0\db_1\bin;C:\Program Files\HP\NCU;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\OmniBack\bin\

Flipping that -- putting the db home first -- solved the problem and allowedd:\OPIS2005\ADMIN\SCRIPTS\com>rman target /' to connect as it is supposed to.