RMAN-00554,RMAN-04005,ORA-0103 when remote connection by rman

Whenever I try to connect remotely to a database through rman it fails with message RMAN-00554, RMAN-04005, ORA-0103.
In this example my source database is saturn and destination database is jupiter. From jupiter let me try to connect to saturn.
Source database
Before proceed let's see the parameter that we can use to connect to rman without tnsnames.ora. Our needed parameter is hostname/ipaddress, service_name and port number. These three can be found by issuing lsnrctl status in source machine.
Note that you must have a password file setup in the source database. This requires the use of the "orapwd" command and the initialization parameter "REMOTE_LOGIN_PASSWORDFILE".

bash-3.00$ hostname
saturn

SQL> show parameter remote_login
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE

bash-3.00$ lsnrctl status

LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 08-OCT-2008 06:07:54

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
Start Date 27-JUL-2008 02:00:31
Uptime 73 days 4 hr. 7 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=saturn)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "SHAIK.SATURN.SHAIKBD.COM" has 1 instance(s).
Instance "SHAIK", status READY, has 1 handler(s) for this service...
The command completed successfully

Our interest is bolded. hostname=saturn, port=1521(default) and service_name=SHAIK.SATURN.SHAIKBD.COM
Try to connect to source database from destination database (from jupiter to saturn)
bash-3.00$ hostname
jupiter

bash-3.00$ rman target system/sistem@saturn/ASHAIK.SATURN.SHAIKBD.COM

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Oct 8 05:48:50 2008

Copyright (c) 1982, 2005, 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

We did not used port here as port is default. If it was not default suppose it was 1522 then we would use rman target system/sistem@saturn:1522/SHAIK.SATURN.SHAIKBD.COM
Diagnosis why problem happens (In the source database)
In order to connect to rman a user must have the sysdba system privilege otherwise it will fail. As we are login through network password file authentication will be used. And in the password file user system must be entryed as sysdba.

SQL> !hostname
saturn

SQL> select * from v$pwfile_users;

USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE

As we see here in the passwordfile only SYS is there. So only sys can do the task to connect to rman through network. In order to permit system to logon through network grant him to SYSDBA.

SQL> grant sysdba to system;
Grant succeeded.

Now check the entry in passwordfile.

SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
SYSTEM TRUE FALSE


Check now from destination database (Here it is jupiter)

bash-3.00$ hostname
jupiter
bash-3.00$ rman target system/sistem@saturn/SHAIK.SATURN.SHAIKBD.COM
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Oct 8 05:50:13 2008

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

connected to target database: SHAIK(DBID=2869417476)

And now it succeeds.

Comments

Popular posts from this blog

ORA-04062: timestamp of procedure has been changed

ORA-00939: too many arguments -when case arguments exceed 255

ORA-31655: no data or metadata objects selected for job