DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Use of RMAN

  1. #1
    Join Date
    Nov 2000
    Posts
    2

    Post

    Hello.
    I wonder if anyone can help me with scripts performing hot and cold backups using RMAN.
    I'm also interested in scripts performing recovery using RMAN. I'm running Windows 2000 and Oracle 8.1.6.

  2. #2
    Join Date
    Nov 2000
    Posts
    245


    there are some samples under orant\RDBMS80\RMAN

  3. #3
    Join Date
    Nov 2000
    Posts
    25
    Hi

    See the following scripts. Its used mainly for a hot backup but this will give you a startup .



    #Rman Script for allocating one Disk
    #
    create script alloc_1_disk {
    allocate channel dev1 type disk;
    }

    #Rman Script for releasing a disk channel
    #
    create script rel_1_disk {
    release channel dev1 ;
    }

    #Script for archiving the current redo log
    # Should be done after every hot backup
    #
    replace script archive_log_current {
    sql ' alter system archive log current' ;
    }


    #Script for backing up all archived logs
    # Source filed will be removed after a successful backup
    #
    replace script backup_al_all {
    execute script alloc_1_disk;
    backup
    format 'f:\OracleBack\al_t%t_s%s_p%p'
    (archivelog all delete input);
    execute script rel_1_disk;
    }


    #Script for backing up the whole database to disk
    # Control file will be added automatically
    #
    replace script backup_db_full {
    execute script alloc_1_disk;
    backup
    full
    skip inaccessible
    tag b_db_full
    format 'f:\OracleBack\df_t%t_s%s_p%p'
    (database);
    execute script rel_1_disk;
    execute script archive_log_current;
    execute script backup_al_all;
    }

    # Script for a level_0 whole database backup
    #
    #
    replace script backup_db_level_0 {
    execute script alloc_1_disk;
    backup
    incremental level 0
    skip inaccessible
    tag backup_db_level_0
    format 'f:\OracleBack\df_t%t_s%s_p%p'
    (database);
    execute script rel_1_disk;
    execute script archive_log_current;
    execute script backup_al_all;
    }

    # Script for a level_1 whole database backup
    #
    #
    replace script backup_db_level_1 {
    execute script alloc_1_disk;
    backup
    incremental level 1
    skip inaccessible
    tag backup_db_level_1
    format 'f:\OracleBack\df_t%t_s%s_p%p'
    (database);
    execute script rel_1_disk;
    execute script archive_log_current;
    execute script backup_al_all;
    }

    # Script for a level_2 whole database backup
    #
    #
    replace script backup_db_level_2 {
    execute script alloc_1_disk;
    backup
    incremental level 2
    skip inaccessible
    tag backup_db_level_2
    format 'f:\OracleBack\df_t%t_s%s_p%p'
    (database);
    execute script rel_1_disk;
    execute script archive_log_current;
    execute script backup_al_all;
    }



    HTH
    Santosh.




















  4. #4
    Join Date
    Jan 2001
    Posts
    3

    Angry Recovery using RMAN

    Hi Friends,

    I am new to this field. I tried my hand with RMAN. I have some doubts on it..


    1)While taking database backup (on disk) is it possible to take it in a machine other than the target machine??

    2)While recovering the database, should we recover to the orginal databse or create another database and recover into that???

    I encountered these problems in both the cases:
    - recovering into the same datbase->
    We need to connect to target and catalog database for recovering it. I am able to restore the database. But while trying to recover , it don't recover the tablespace belonging to the USER rman (saying that it is in use). Is my approch wrong !! Please comment on this.

    -recovering into another database
    Assume that i create another database for recovering this.But if u list the backup, after u connect to catalog and target database, RMAN won'y show anything. since no entry is there. May be i am missing something. Can you please throw some light into this...


    thank you,

    shibi

  5. #5
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843

    thought this doc could be an add on...


    [url]http://www.oracle.com/oramag/oracle/00-Mar/o20rec.html[/url]


  6. #6
    Join Date
    Jan 2001
    Posts
    3
    I visit the site [url]http://www.oracle.com/oramag/oracle/00-Mar/o20rec.html[/url]

    one doubt on that

    Before running the recovery script..

    RMAN> run {
    2> allocate channel t1 type 'sbt_tape';
    3> restore database;
    4> recover database;
    5> release channel t1;
    6> }


    where should RMAN connect to... should i connect to the same target and catalog database . If it is the same databse, while recovering won't it give error "file already in use"???

    correct me if i am wrong.

    regards,
    shibi

  7. #7
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Read step-5 carefully. Answers first Q. You first connect to tarhet then to rcvcatalog. Then you will start using RMAN backup,restore commands.

    C:\> rman80
    RMAN> connect target internal/password@PROD
    RMAN> connect rcvcat rman/rman@OEM
    RMAN> # then enter your RMAN commands here


    Read the listing 2 script carefully, that answers your 2nd Q.

    1)If whole database is in restore mode, it will not be in opened mode.
    Here the database WILL NOT BE available for access to users
    2)If part of database say tablespace1, you bring it offline and restore,recover and bring it back online.
    Here Your rest of database WILL BE available for access to users.

  8. #8
    Join Date
    Jan 2001
    Posts
    3

    Talking

    thank you Mr.Reddy,

    Its working fine for me now...


    shibi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width