Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validating a restore

Status
Not open for further replies.

sgwisby

Technical User
Joined
Apr 13, 2005
Messages
148
Location
US
I ran the following command based on Oracle 9i restore and recovery documentation, and it stated this 'To perform the validation, the database can be mounted or open. You do not have to take datafiles offline when validating them.'
Yet I get the following error message:

RMAN> run
2> { allocate channel d1 device type disk;
3> restore controlfile validate;
4> RESTORE TABLESPACE SYSTEM VALIDATE;
5> RESTORE ARCHIVELOG ALL VALIDATE;
6> }

released channel: ORA_DISK_1
allocated channel: d1
channel d1: sid=16 devtype=DISK

Starting restore at 03-OCT-05

released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 10/03/2005 15:34:37
RMAN-06496: must use the TO clause when the database is mounted or open.

Can someone tell me what I am doing wrong or how to correct the issue?
Thanks
David
 
Oracle's docu said:
6496, 1, "must use the TO clause when the database is mounted or open"
// *Cause: A controlfile restore was attempted when the database
// is mounted or open and no alternate destination was specified.
// *Action: Specify an alternate destination with the TO clause or dismount
// the database.
hope this helps
 
An example of documentation error then ?

Alex
 
Alex,

not sure if this is an example of documentation error.
The first quote in David's post is about validating datafiles,
Error RMAN 6496 is about restoring controlfiles.
Not sure if restore is needed for validation; I presume you may validate your database, or you you may validate your backup?

regards
 
Hoinz

No idea - I don't use RMAN myself, but David did exactly as the docs said he could.


From Chapter 10 - Oracle 9i(9.2) RMAN users guide

To let RMAN choose which backup sets or copies to validate:

To perform the validation, the database can be mounted or open. You do not have to take datafiles offline when validating them.

Validate the restore of the backup sets and copies. This example validates the restore of the backup control file, SYSTEM tablespace, and all archived logs:

RESTORE CONTROLFILE VALIDATE;
RESTORE TABLESPACE SYSTEM VALIDATE;
RESTORE ARCHIVELOG ALL VALIDATE;


Alex
 
Alex,

ok, it seems you are right. There is a contradiction in Oracle's documentation.
As you may have supposed, I hardly ever use RMAN, and I never did a validate.

No idea then ...
 
... and what scares me most:
According to the manual, a 'validate' should not produce any output files.
But this error message shows it does (or at least it tries).

... confused ....
 
Hey, thanks for the responses. I am confused too, since docs say validating the restore of a backup can be done online. I took down the database and tried, guess what, when the db is down you can't connect to the target database. Therefore you can't validate that the restore of the datafiles will succeed.
Can someone provide information on how to validate the restore in 9i. I am not familiar with Oracle so I don't know if you can take down the db and just do a 'startup mount'(not sure where I saw that statement)to run the validate command.
Any ideas, I need to make sure this all works before we go into production.
Thanks
David
 
Hi,

not sure about this, but two ideas:

1) You could try the first option of my first answer:
Specify an alternate destination with the TO clause
Something like:
restore controlfile to '/path/to/temporary/file' validate;

2) If this doesn't work:
What happens if you, for a first test, leave away the line for controlfile?

hope this helps
 
I ran the following command:

rman>run
{allocate channel d1 device type disk;
restore controlfile TO 'filename' validate;
}

The validation appeared to be successful, however it went ahead and restored the controlfile. This is not the intended results as I want to validate in order to know if the backup is going to be able to be restored if and when I need it.
Any ideas?
Thanks
David
 
Hoinz, I wrote the above statement while you were writing your response so I didn't think about restoring to a temp directory. Does validate always run the restore after validation?
When you specify a filename is the name that rman names the file during backup or is it the name of the controlfile itself?
Thanks
Davdi
 
I think there may be a confusion of terms here?

sgwisby - are you trying to validate the backup, so that when you do it, it will succeed ?

OR

are you trying to retore the backup and validate that it is correct ?

Having looked at the docs (its a bit slow today) I think that to do the first you need to 'VALIDATE BACKUPSET' and to do the second 'RESTORE .... VALIDATE'

Alex
 
I just did a few tests,
and it seems controlfile is the only file that gets restored when you validate.
Okay, this is not the intended result; a bug or a feature?

I presume the reason is that a controlfile (opposed to a datafile or an archive log) is the only file that cannot be restored to its original place as long as the database is running, and Oracle saw no need or no good in developing a completely new feature just for validating.

But couldn't you live with it?
I suggest you test with archive logs next, and datafiles later on.

And sorry, your question about filenames is not clear to me.

regards
 
Alex, thanks for your input. I am trying to validate the backup, so that when you do it, it will succeed ?
David

Hoinz, I was under the impression that you could actually do a 'RESTORE DATABASE VALIDATE' or 'RESTORE BACKUP VALIDATE' (not sure which terminology is used), to ensure a successful recovery/restore was possible.
Thanks
David
 
So you need to 'VALIDATE BACKUPSET' then

Alex
 
David,

I think your impression is correct, except for control files.
I am not an expert for validation though. Further reading and testing urgently recommended!
I tried a 'restore archivelog from logseq 1234 validate;'
and I got a 'validation complete', but no files restored.

Regarding Alex's remark:
'validate backupset' seems to be an all-including method then.

And it's evening here,
bye!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top