-
Tag Rman
Is it possible to concat values in the rman command lines?
I am using the following statement to back up the database.
RMAN> run {
2> backup as compressed backupset database tag 'BACKUP_FULL_ORCL%';
3> backup archivelog all delete all input tag 'BACKUP_FULL_ARCHIVELOG%';
4> }
I would like to know how I do to concat a value like sysdate on the TAG.
For example:
backup as compressed backupset database tag 'BACKUP_FULL_ORCL'||sysdate
I tried and it is not worked.
-
I am not sure on which environment you are. If you are on UNIX you can use following.
export this at very start of your unix script
export TAG_0 =LEVEL0_`date`
you can see man date and can use option like `date +%d or +%m`
and in run block give follwing
RMAN> run {
2> backup as compressed backupset database tag '$TAG_0';
3> backup archivelog all delete all input tag ''$TAG_0';
4> }
Rgds
Parag
-
So, I am linux environment.
Look how I did.
[flavio@xflavio ~]$ export TAG_0=BACKUP_FULL_ORCL_$(date +%d_%m_%y)
[flavio@xflavio ~]$ rman target /
RMAN> backup as compressed backupset database tag '$TAG_0';
But there was an error
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/30/2007 18:13:51
ORA-01264: Unable to create backup piece file name
ORA-07217: sltln: environment variable cannot be evaluated.
Did I do anything wrong?
-
You can specify it as "${TAG_0}".
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
|