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

Thread: RMAN cold backup

  1. #1
    Join Date
    Jul 2001
    Posts
    181
    I have a rman cold backup script.

    I cannot use alter database close which I believe internally does a shutdown and a startup mount.

    I have tried within the rcv script to do
    sql 'shutdown immediate' I get an error invalid sql statement.

    Any ideas?

  2. #2
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    Here is my RMAN script (9i) - perhaps you can get ideas.

    set snapshot controlfile name to '/backupora/wmsp/OFFwmsp1_t20020627.ctl';

    run {
    shutdown immediate;
    startup mount;

    allocate channel c1 type disk;
    allocate channel c2 type disk;
    backup full
    filesperset 4
    format '/backupora/wmsp/OFFwmsp1_t%T_s%s_p%p'
    tag full_offline_20020627
    (database);

    backup
    filesperset 10
    format '/backupora/wmsp/OFFarchwmsp1_t%T_s%s_p%p'
    tag full_offlineARCH_20020627
    (archivelog all);
    sql 'alter database open';
    release channel c1;
    release channel c2; }


    =========
    Any place above where you see a hard coded date, I dynamically pieced together with a shell script.

  3. #3
    Join Date
    Apr 2002
    Location
    Shenzhen, China
    Posts
    327
    SHUTDOWN and STARTUP should be placed outside of run {}
    Oracle Certified Master - September, 2003, the Second OCM in China
    *** LOOKING for PART TIME JOB***
    Data Warehouse & Business Intelligence Expert
    MCSE, CCNA, SCJP, SCSA from 1998

  4. #4
    Join Date
    Jul 2001
    Posts
    181
    cheers

  5. #5
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    calvin,

    This script has been running 7 days a week 3 times a day for 3 databases (21 times a week) and running fine!

    However, I do believe the way it is inside the {} is a 9i feature.

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