Database Backup and Recovery (MOSC)

MOSC Banner

Rman TAGs with variables in Stored Scripts

edited Dec 18, 2015 10:02AM in Database Backup and Recovery (MOSC) 3 commentsAnswered

When writing shell scripts its easy to create variables and create rman command and tags with date formats etc.

When using stored scripts, I have tried passing in variables , and using filespec with no luck.

How do you create a TAG based on date in stored scripts?

e.g   where the tag says 'test', change to 'test_yymmdd' .

This works:

CREATE GLOBAL SCRIPT global_backup_inc0_disk
COMMENT 'comment'
{    
resync catalog;

  allocate channel disk1
    device type disk
    format '/xxx/%d/%d_lvl0_%t_s%s_p%p.bck';

  backup incremental level 0
    tag lvl0
    maxsetsize=25G
    database
    plus archivelog
    maxsetsize=25G;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center