-
Restore script
connect rcvcat rman/jifVufs@RCATMR
connect target internal/internal;
run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
backup
format 'tbs_db_%d_%t_%s_%p'
tablespace XOVOLT01X,XOVOLT02X,XOVOLT03X,xovolt04x,XOVOLT05X,XOVOLT06X;
release channel t1;
}
Hi I have the above script whichg backups individual tablespaces in a database. What is the syntax to restore these in the event of a failure do I have to specify each individual one.
Thanks in advance.
-
for restoring the tablespace
Code:
run {
allocate channel c1 type 'SBT_TAPE';
recover tablespace "XOVOLT01X";
release channel c1;
}
or
Code:
run {
allocate channel c1 type 'SBT_TAPE';
restore (datafile number);
recover tablespace "XOVOLT01X";
release channel c1;
}
well if you have a full database backup all you need to do is
Code:
run {
allocate channel c1 type 'SBT_TAPE';
recover databse;
release channel c1;
}
RMAN will see what all you need to recover and all your headach is gone :-) (of course if you want to have full control then you can use the other options as well)
in the event of a failure do I have to specify each individual one.
depends on how many you loose together...
what you can do is
Code:
run {
allocate channel c1 type 'SBT_TAPE';
recover tablespace "XOVOLT01X";
recover tablespace "XOVOLT02X";
recover tablespace "XOVOLT03X";
recover tablespace "XOVOLT04X";
release channel c1;
}
HTH
Last edited by adewri; 02-25-2003 at 11:20 AM.
Amar
"There is a difference between knowing the path and walking the path."
-
I have been given this script from metalink it doesn not do a recover is this wrong?
connect rcvcat rman/jifVufs@RCATMR
connect target internal/internal;
run {
sql 'ALTER TABLESPACE XOVOLT01X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT02X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT03X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE xovolt04x OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT05X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT06X OFFLINE TEMPORARY';
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
restore tablespace XOVOLT01X,XOVOLT02X,XOVOLT03X,xovolt04x,XOVOLT05X,XOVOLT06X;
release channel t1;
release channel t2;
}
-
Add the line recover tablespace.
Code:
run {
sql 'ALTER TABLESPACE XOVOLT01X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT02X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT03X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE xovolt04x OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT05X OFFLINE TEMPORARY';
sql 'ALTER TABLESPACE XOVOLT06X OFFLINE TEMPORARY';
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
restore tablespace XOVOLT01X,XOVOLT02X,XOVOLT03X,xovolt04x,XOVOLT05X,XOVOLT06X;
recover tablespace XOVOLT01X,XOVOLT02X,XOVOLT03X,xovolt04x,XOVOLT05X,XOVOLT06X;
release channel t1;
release channel t2;
}
restore command just extracts the datafiles from the RMAN backup... you need to give a recover command to recover the tablespaces..
HTH
Last edited by adewri; 02-24-2003 at 10:37 AM.
Amar
"There is a difference between knowing the path and walking the path."
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|