passing parameter to RMAN stored script [message #254463] |
Thu, 26 July 2007 17:22 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Is it possible to pass parameters to an RMAN stored script?
I duplicate my production database to a development database fairly regularly and I would like to create a stored script which takes a parameter of the UNTIL clause.
eg.
run {execute script duplicateDb(until_sequence => 12345);}
Is this possible? None of the books and 'net sources that I have read mention this particular (lack of) feature
Thanks!
|
|
|
|
Re: passing parameter to RMAN stored script [message #254466 is a reply to message #254463] |
Thu, 26 July 2007 17:27 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
Use it in your stored script
create script DUPLICATE_DATABASE
{
allocate channel ch1 type disk format '$ba_ORABACKUP/%U.bck';
allocate channel ch2 type disk format '$ba_ORABACKUP/%U.bck';
allocate channel ch3 type disk format '$ba_ORABACKUP/%U.bck';
set limit channel ch1 kbytes 2024800;
set limit channel ch2 kbytes 2024800;
set limit channel ch3 kbytes 2024800;
=======================HERE you can use======================
.
.
.
and then excute only
run {execute script DUPLICATE_DATABASE}
|
|
|
Re: passing parameter to RMAN stored script [message #254467 is a reply to message #254463] |
Thu, 26 July 2007 17:44 |
clintonf
Messages: 82 Registered: May 2006
|
Member |
|
|
Thanks for the replies.
I'm a little confused about what I would put in after the "HERE you can use" part.
For the record, my recovery catalog is on a windows machine. I'm not sure if that affects things or not.
If I don't specify the UNTIL clause will RMAN simply recover as far as it can go?
Thanks!
|
|
|
Re: passing parameter to RMAN stored script [message #254468 is a reply to message #254467] |
Thu, 26 July 2007 17:47 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
Quote: | f I don't specify the UNTIL clause will RMAN simply recover as far as it can go?
|
No until you specify the recover clause.
Until clause will recover your database to the specfic condition
Where as recover database recover it to the last point of failure if you have all archivelogs.
[Updated on: Thu, 26 July 2007 17:49] Report message to a moderator
|
|
|
|