Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamically Named Restore Points?

604976Apr 29 2008 — edited Apr 30 2008
Does anyone know how to create dynamically named restore points? I have an RMAN script that is currently setup like this:

sql 'drop restore point lv_restore';
sql 'create restore point lv_restore';
backup database plus archivelog;
delete noprompt obsolete;
exit;

The first line is where I drop the restore point and the second line is where I create it again. This way the restore point is set just before the backup begins.

Okay - it's setup like this because when I don't drop the restore point ahead of time I get the following error:

sql statement: create restore point lv_restore
RMAN-00571: =================================================
RMAN-00569: ======== ERROR MESSAGE STACK FOLLOWS ===========
RMAN-00571: =================================================
RMAN-03009: failure of sql command on default channel at 04/29/2008 15:22:44
RMAN-11003: failure during parse/execution of SQL statement: create restore point lv_restore
ORA-38778: Restore point 'LV_RESTORE' already exists.

This makes sense to me, actually. What I would love to do is to dynamically append the current date to the end of the restore point name. The idea is to have the restore points named something like this:

lv_restore_2008-04-25
lv_restore_2008-04-26
lv_restore_2008-04-27
lv_restore_2008-04-28
lv_restore_2008-04-29

etc...

Is there any way I can dynamically name restore points?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2008
Added on Apr 29 2008
3 comments
728 views