Home » RDBMS Server » Backup & Recovery » passing parameter to RMAN stored script
passing parameter to RMAN stored script [message #254463] Thu, 26 July 2007 17:22 Go to next message
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 #254464 is a reply to message #254463] Thu, 26 July 2007 17:24 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
If on *nix, a HERE script would satisfy your requirements
Re: passing parameter to RMAN stored script [message #254466 is a reply to message #254463] Thu, 26 July 2007 17:27 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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

Re: passing parameter to RMAN stored script [message #463061 is a reply to message #254463] Tue, 29 June 2010 09:46 Go to previous message
pgalaktionov
Messages: 1
Registered: June 2010
Junior Member
may be it help you

oracle.com/ technology/oramag/oracle/09-sep/o59recovery. html
Previous Topic: 64 bit restore to 32 bit
Next Topic: RMAN throws RMAN-01009: syntax error: found "double-quoted-string": expecting one of: &
Goto Forum:
  


Current Time: Thu Nov 21 21:08:53 CST 2024