Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Yogesh.

Asked: May 28, 2002 - 9:04 pm UTC

Last updated: June 27, 2006 - 2:50 pm UTC

Version: 8.1.7

Viewed 10K+ times! This question is

You Asked

I have two database servers. Both have 4 oracle instances. One database each for RMAN specifically. I'm want to store details on cross servers i.e. details of server 1 in RMAN instance on second and vice versa.

When I issue

rman target sys/change_on_install@mdb catalog rman/rman@rcat

I get following error ....

Recovery Manager: Release 8.1.7.0.0 - Production

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-01017: invalid username/password; logon denied


but if I say sqlplus sys/change_on_install@mdb, I'm able to connect ... can you please tell me where I'm going wrong




and Tom said...


Article-ID: <Note:1034291.6>
Circulation: PUBLISHED (EXTERNAL)
Folder: server.Recovery.RMAN
Topic: Known Problems
Title: RMAN-00569 -04005 ORA-01017: Connecting to Target Database
Document-Type: PROBLEM
Impact: LOW
Skill-Level: CASUAL
Server-Version: 08.00.0X to 09.00.0X
Updated-Date: 21-FEB-2002 10:41:53
References:

Attachments: NONE
Content-Type: TEXT/PLAIN
Keywords: ORA-01017; RMAN-04005; RMAN;
Errors: ORA-01017; RMAN-04005;
Products: 5/RMAN (08.00.03.XX to 09.00.0X);
Platforms: GENERIC (2.5.1);

Problem Description:
====================

Recovery Manager fails with the following errors when attempting to connect
to the target database:

% rman

Recovery Manager: Release 8.0.3.0.0 - Production

RMAN> connect target sys/change_on_install@TARGETDB

RMAN-00569: ================error message stack follows
RMAN-04005: error from target database:
ORA-01017: invalid username/password; logon denied


Problem Explanation:
====================

Recovery Manager automatically requests a connection to the target database
as SYSDBA.


Search Words:
=============

password file, orapwd, RMAN-569, RMAN-4005, ORA-1017, RMAN-554

Solution Description:
=====================

Recovery Manager automatically requests a connection to the target database as
SYSDBA. In order to connect to the target database as SYSDBA, you must either:

1. Be part of the operating system DBA group with respect to the target
database. This means that you have the ability to CONNECT INTERNAL
to the target database without a password.

- or -

2. Have a password file setup. This requires the use of the "orapwd" command
and the initialization parameter "remote_login_passwordfile". See Chapter 1
of the Oracle8(TM) Server Administrator's Guide, Release 8.0 for details.
Note that changes to the password file will not take affect until after
the database is shutdown and restarted.

For Unix, also ensure TWO_TASK is _not_ set.
e.g. % env | grep -i two
If set, unset it.
% unsetenv TWO_TASK


Solution Explanation:
=====================

Recovery Manager automatically requests a connection to the target database as
SYSDBA. If the target database does not have a password file, the user you are
logged in as must be validated using Operating system authentication (similar
to svrmgrl, and connect internal).

NOTE: SYSOPER privileges are not sufficient. SYSDBA privileges are required
for the target database.




Rating

  (18 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

RMAN Error

Ramu, October 09, 2002 - 6:32 am UTC

Hi tom ,

I am getting the error using the RMAN while executing the following command

RMAN> run {
2> allocate channel disk1 type disk format
3> 'd:/rman/mydb/%d_fb_%t';
4> sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
5> }

The error is
-------------
RMAN-08522: input datafile fno=00005 name=C:\ORACLE\ORADATA\MOMDB\INDX01.DBF
RMAN-08522: input datafile fno=00006 name=C:\ORACLE\ORADATA\MOMDB\OEMREP01.DBF
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03007: retryable error occurred during execution of command: backup
RMAN-07004: unhandled exception during command execution on channel disk2
RMAN-10035: exception raised in RPC: ORA-19504: failed to create file "d:/rman/M
OMDB_fb_474824217"
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECRE
ATE
---------------------
can please tell me where is the problem and to solve it .


Thank you !




Tom Kyte
October 09, 2002 - 4:29 pm UTC

does the directory exist, is it writeable by the OS account that is running rman.

RMAN / Ramu

Mark A. Williams, October 09, 2002 - 4:50 pm UTC

Ramu:

The run block you have posted can not be the one generating the error. The channels are different (disk1 and disk2), there is no backup command in the run block (but the error occurs during execution of a backup command), and the paths are different ('d:/rman/mydb/' and 'd:/rman/')... The run block you have posted does nothing more than switch logfiles...

HTH,

Mark

Tom Kyte
October 09, 2002 - 5:19 pm UTC

Mark -- thanks, i didn't really even read it that closely.

99.9999% of the time -- its that the directory doesn't exist. But you are correct, this cut and pasted is "doctored" ;)

RE: doctored

Mark A. Williams, October 09, 2002 - 10:03 pm UTC

Yeah, and I'll bet this is the only one ever... :)

- Mark

Ramu, October 10, 2002 - 2:23 am UTC

I have just added the "backup database;" in the run command It was executed successfully.
Thank you very much for your cooperation



Different Error

Rahul, January 10, 2003 - 2:43 am UTC

Hi Tom

My target db and recovery catalog is on same system and when I tried to connect to RMAN with catalog, it gave me following error.


C:\>RMAN CATALOG RECCAT/RECCAT

Recovery Manager: Release 8.1.6.0.0 - Production

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-12560: TNS:protocol adapter error

When I tried to connect with host string, it gave me different error. See below...

C:\>RMAN CATALOG RECCAT/RECCAT@RND.COM

Recovery Manager: Release 8.1.6.0.0 - Production

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION


Thanks.


Different Error

Rahul, January 10, 2003 - 2:43 am UTC

Hi Tom

My target db and recovery catalog is on same system and when I tried to connect to RMAN with catalog, it gave me following error.


C:\>RMAN CATALOG RECCAT/RECCAT

Recovery Manager: Release 8.1.6.0.0 - Production

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-12560: TNS:protocol adapter error

When I tried to connect with host string, it gave me different error. See below...

C:\>RMAN CATALOG RECCAT/RECCAT@RND.COM

Recovery Manager: Release 8.1.6.0.0 - Production

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION


Thanks.


securing rman connections

A reader, June 03, 2003 - 7:00 am UTC

Hi

in oracle 9.2.0.1 and RedHat Linux

in that note you posted, the first solution is

1. Be part of the operating system DBA group with respect to the target database. This means that you have the ability to CONNECT INTERNAL to the target database without a password.

according to bug 644988 there is no way we can do connect internal remotely because according to that bug most connections are not secure so I guess this solution is discarded? Also how can we tell Oracle our connection is secure if it always assumes it´s not secure?

I have done some tests in my test databases, I created a user called test at OS level and created a ops$test in the database, my goal is to conect to the database remotely using (connecting without providing password)

CONNECT /@net_service_name AS SYSDBA

as shown in </code> http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96521/dba.htm#13465 <code>

however I just noticed this would never work! In order to conenct using "/ as sysdba" I must have a externally identified user, if I do

grant sysdba to ops$test;

I get ORA-01997: GRANT failed: user 'OPS$TEST' is identified externally

From Metalink this expected behaviour because you cannot grant sysdba to ops$ users. So I guess the documentation is wrong suggesting we can connect remotely using

CONNECT /@net_service_name AS SYSDBA
CONNECT /@net_service_name AS SYSOPER

???



The purpose of all this is I ant to backup around 20 databases from a server where my RMAN Catalog is lcoated. I want to execute rman from there and backup the database remotely because I dont want to store my rman catalog owner and password in all servers.

Tom Kyte
June 03, 2003 - 7:46 am UTC

umm, you've misread that "bug that is not a bug".

You use orapwd to setup remote connect internal privs in a secure fashion.

You cannot connect remotely "securely" using OS authentication. Think about it. Hmm, I'll just drop my machine in your network. I'm running unix, I'll just create an OS user test. Hmmm, I'm in.

You cannot do what you are attempting to do securely. That "bug that is not a bug" tells you how you can do this securely and it'll require a password.


You will need an rman account using a password on your servers. This rman account will have sysdba. Think about how INSECURE it would be if you just trusted the remote OS to say "rman here, please let me in"

forogot to mention my parameters

A reader, June 03, 2003 - 7:07 am UTC

hi

the parameters settings are

os_authent_prefix string ops$
remote_login_passwordfile string NONE
remote_os_authent boolean TRUE




I understand its not a bug

A reader, June 03, 2003 - 10:47 am UTC

Hi

I understood it´s not a bug, rather how things work. Then the documentation is wrong suggesting we can use

CONNECT /@net_service_name AS SYSDBA
CONNECT /@net_service_name AS SYSOPER


That is never possible!

Also in administrator guide, there is flow chart suggestiing when to use password file and when to use os authentification, if we cannot do remote os authentification (with sysdba) then that flow chart is wrong too!

error info

Reader, June 19, 2003 - 1:32 pm UTC

Tom, when I used OEM (RMAN interface) to backup my full database (9.2.0), I received the following error.

RMAN:03009: Failure of controlfile and Spfile Autobackup Command on WB channel at 06/19/2003 12:21:51

Could you please help me in resolving this error. Thanks.

Tom Kyte
June 20, 2003 - 3:26 pm UTC

try cutting and pasting FULL error stacks. insufficient data.

Following error creating me full confusion

Reddy, July 25, 2003 - 1:57 am UTC

Hi Tom

Thanks for your early reply's. Now I am practicing backup and recovery using RMAN. I will give what scenarios are followed.

1. We have crated succefully RMAN and backed up my database succesfully.
2.Then I shutdown completely my target database and deleted one of the my datafile.
3. Using RMAN I restored and recovered successfully.
4. I inserted some data in my db using insert into ... around 11.30 AM.
5.I tried to recover using incomplete recovery using UNTILE my db Using RMAN. I got error so, I stopped recovery using RMAN.
6.I have givin in svrmgrl recover database until '2003-07-24:11:00:00'
I got confirmation that recovery completed.
7. Then I opened " alter database open resetlogs".
8. But my old data I din't get my old data.

the next day the 25-07-2003.

1.I started to RMAN successfully and I connected.
2.When I give " resyc database ", I got the following error.
RMAN-03022: Compilling command: resync
RMAN-03023: Executing command : resync
RMAN-08029: Snapshot control file name set to default value: %ORACLE_HOEM%\DATABASE\SNCF%ORACLE_SID%.ORA

3. When I checked my os level at E:\ORACLE816\DATABASE\SNCFREDDY.ORA file has been created. But I donot know how this file has been created.

Can you tell me how I should resove the problem and how this file has been created without my knowledge.



trial recovery

Reader, February 20, 2004 - 10:46 pm UTC

Tom, is trial recovery command an RMAN command or SQL command? When I tried at RMAN prompt I recieve the following error. However, after restoring the tablespace using RMAN, and if I issue 'recover tablespace users test' command from SQL prompt, no problem and it does work. I was wondering if trial recovery command should be issued at SQL prompt? Thanks.

RMAN> recover tablespace users test;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "test": expecting one of: "archivelog, check, comma, delete, from, high, noredo, ;, until"
RMAN-01007: at line 2 column 26 file: standard input


Tom Kyte
February 21, 2004 - 10:51 am UTC

that is the "user managed backup and recovery" command, yes

</code> http://docs.oracle.com/docs/cd/B10501_01/server.920/a96572/troublereco.htm#25755 <code>




RMAN identifying the lost datafile

Vikas, June 10, 2004 - 2:38 am UTC

Hi Tom,

How does RMAN identifies which datafile to restore and recover in case some has physically deleted the file from OS. We are operating in NOCATALOG mode.

Regards,
Vikas



Tom Kyte
June 10, 2004 - 7:49 am UTC

physcially deleted "what" file exactly?

mapped drive not possible with RMAN?

idai, August 13, 2004 - 9:40 am UTC


rman the throwing an error message, but I don't know why (need some clue )...

Thanks

here is the stack

I:\>rman target sys/<pwd>@DBX RCVcat rman/rman@RMAN

Recovery Manager: Release 8.1.7.4.1 - Production

RMAN-06005: connected to target database: ORACLE (DBID=1358426462)
RMAN-06008: connected to recovery catalog database

RMAN> run { allocate channel c1 type disk format 'I:\df_%d_%s_%p';
2> backup ( datafile 'D:\DATA\ORACLE\DBX\TOOLS01.DBF' include current control
file );
3> }

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: c1
RMAN-08500: channel c1: sid=95 devtype=DISK

RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel c1: starting full datafile backupset
RMAN-08502: set_count=6 set_stamp=534093505 creation_time=13-AUG-04
RMAN-08010: channel c1: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00005 name=D:\DATA\ORACLE\DBX\TOOLS01.DBF
RMAN-08011: including current controlfile in backupset
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03007: retryable error occurred during execution of command: backup
RMAN-07004: unhandled exception during command execution on channel c1
RMAN-10035: exception raised in RPC: ORA-19504: failed to create file "I:\df_ORA
CLE_6_1"
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECRE
ATE

RMAN> exit

RMAN-08031: released channel: c1

Recovery Manager complete.

I:\>



Tom Kyte
August 13, 2004 - 4:56 pm UTC

RMAN-10035: exception raised in RPC: ORA-19504: failed to create file "I:\df_ORA
CLE_6_1"
ORA-27040: skgfrcre: create error, unable to create file

sort of seems "something easy"?

I: doesn't exist on the server being backed up.
Oracle doesn't have permission to write to I:
A file by that name already exists

or any other of the reasons a file cannot be created.

missed note 145843.1

A reader, August 16, 2004 - 2:52 am UTC


correct "sort of easy"

needed to switch the account oracle which starts the service to an account which has full control over the shared drive
the metalink Note 145843.1 gives the todos ...

thanks


rman executable which machine??

dxl, August 16, 2004 - 7:24 am UTC

Tom

Early on in this question thread RAMU had a ORA-19504 type error when trying to run a backup script:


"...RMAN-10035: exception raised in RPC: ORA-19504: failed to create file "d:/rman/M
OMDB_fb_474824217"
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECRE
ATE
---------------------
can please tell me where is the problem and to solve it .


Thank you ! ..."


and your reply was:



"Followup:
does the directory exist, is it writeable by the OS account that is running
rman. "




Now this got me thinking about my rman testing. I have a target db on machine A and a catalog db on machine B and have started to test a backup script using RMAN.

So i logged onto machine B and ran the RMAN executable to login to target on A and catalog on B.

Here's where i made my first mistake, i configued a channel referencing a directory on machine B, however i then got a ORA-19504 error saying it couldn't find the dir. I realised that the dir has to be on the same machine as the target. So..

1) does it matter where you run the RMAN executable, ie which machine A or B?? which one would produce less network traffic? If on A then all the metadata needs to go to the catalog over the network whereas if using RMAN on machine B then does it make a difference?? which is preferable?

2) in your reply to RAMU's question

"..does the directory exist, is it writeable by the OS account that is running
rman. "

well if i was running rman on machine B then the dir that is configured for machine A could be created by a completely different os user than who is running my rman executable on machine B, so would the machine B user get the right permissions to access the dir on machine A??
Or should i just be using RMAN on machine A to solve all these issues?

Many thanks




Tom Kyte
August 16, 2004 - 8:34 am UTC

1) rman is a client process that connects to a database and runs the backup ON the database. the directories are relative to the server.

2) use rman on b, just use the right paths for backing up?

rman connectivity

dxl, June 15, 2006 - 8:33 pm UTC

Along similar lines to the previous question:

We have a target database on machine A and a catalog db on machine B.

We run the RMAN executable on machine A to connect to target db on machine A and connect to the catalog on machine B.

My question is do we need tns connectivity both ways?? Obviously the rman executable running on machine A has to be able to connect to the target db on machine A (no problem) AND the catalog db on machine B BUT in order to run backups does the catalog db on machine B need to be able to connect via tns to the target db on machine A???

I'm asking because we have firewall issues so do i just need a tns route from A to B or do i also need a tns route from B to A as well??

(my thinking was we only need to be able to route from the RMAN executable on A to the catalog on B )

Thanks for your help

Tom Kyte
June 16, 2006 - 6:57 pm UTC

... does the catalog db on machine B need to be able to connect via tns to
the target db on machine A??? ...

no. rman reads and writes to the catalog, the catalog won't really "reach out and touch" the backed up databases.

READER

A reader, June 27, 2006 - 2:36 pm UTC

Hi Tom

Is RMAN same for oracle 8i and 9i or

are there some enhancements

or it is totally different.I am asking this because i have very good book for backup and recovery for oracle 8i and there is a rman chapter ,but i want to do it for 9i should that work.


Please guide


Tom Kyte
June 27, 2006 - 2:50 pm UTC

rman is a feature of the database.

there is a rman client - which just connects to the database and tells the database to do something, but the logic is in the database.

there is a ton of new stuff in 9i
there is more in 10g

you have access to all of the documentation on otn.oracle.com for free

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.