1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Issuing RMAN commands.

Discussion in 'Server Administration and Options' started by Arju, Oct 10, 2008.

  1. Arju

    Arju Forum Expert

    Messages:
    107
    Likes Received:
    5
    Trophy Points:
    240
    Location:
    Bangladesh
    We can write RMAN commands either inside RMAN prompt or from command prompt.

    An example of issuing rman commands inside RMAN prompt is.

    1)Connect to rman to the target database.

    C:\>rman target /

    Recovery Manager: Release 10.2.0.1.0 - Production on Sat Oct 11 01:21:53 2008

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    connected to target database: TESTDB (DBID=2447953676)

    2)Issuing RMAN commands like:

    RMAN> show backup optimization;

    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE BACKUP OPTIMIZATION OFF; # default

    In many situations however we may not want the output of any commands on the RMAN prompt. We may like to save it in a file. For example at night we may take backup by rman and save the output to a file so that later we can see directly from OS file to be sure whether job was successful or not.

    This task can be done by,

    Code (Text):
    rman target / cmdfile=C:\rman_command.txt log=C:\logfile.log
    or,
    Code (Text):
     rman target / @C:\rman_command.txt log=C:\logile.log
    where, the C:\rman_command.txt will contain any backup or any rman command and output of it will be saved to OS file C:\logfile.log.

    Here is on my session,

    1)notepad c:\rman_command.txt contains,
    show all;

    2)I invoke rman from OS as,

    Code (Text):
    C:\>rman target / @C:\rman_command.txt log=C:\logile.log
    RMAN> 2>

    3)If I open C:|logile.log it got following contains which is for show all, showing all configuration settings of rman.

    Code (Text):
    C:\>notepad c:\logile.log
    Recovery Manager: Release 10.2.0.1.0 - Production on Sat Oct 11 01:30:21 2008

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    connected to target database: TESTDB (DBID=2447953676)

    Code (Text):
    RMAN> show all;
    2>
    using target database control file instead of recovery catalog
    RMAN configuration parameters are:

    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SNCFTESTDB.ORA'; # default

    Recovery Manager complete.