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

Thread: Help: RMAN backup script

  1. #1
    Join Date
    Jan 2005
    Posts
    15

    Help: RMAN backup script

    Hi guys, its me, the Oracle 8i guy again.

    I put together the script below to do my database and archive log backups. However, I would like to backup my controlfile to a file and not to trace. Is there a way to do this within the script?

    Thanks

    ALLOCATE CHANNEL CH1 TYPE DISK;
    ALLOCATE CHANNEL CH2 TYPE DISK;
    ALLOCATE CHANNEL CH3 TYPE DISK;
    BACKUP FORMAT ‘E:\ORACLE\ORADATA\ORABKP\%d_t%t_p%p’ (database);
    SQL ‘ALTER SYSTEM ARCHIVELOG CURRENT’;
    BACKUP (ARCHIVELOG ALL DELETE INPUT);
    SQL ‘ALTER DATABASE BACKUP CONTROLFILE TO TRACE’;
    RESYNC CATALOG;
    }



  2. #2
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    SQL ‘ALTER DATABASE BACKUP CONTROLFILE TO 'C:\oracle\control_bck.ctl';
    anandkl

  3. #3
    Join Date
    Jan 2005
    Posts
    15
    Thants the same thing that I thought, but I got the error below...


    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01005: syntax error: found "identifier": expecting one of: ";"
    RMAN-01008: the bad identifier was: D
    RMAN-01007: at line 8 column 44 file: standard input

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01006: error signalled during parse
    RMAN-02001: unrecognized punctuation symbol ":"

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Just curious, why would you want an additional copy of the controlfile?
    Jeff Hunter

  5. #5
    Join Date
    Jan 2005
    Posts
    15
    Originally posted by marist89
    Just curious, why would you want an additional copy of the controlfile?
    Well I just want to ensure that I am doing everything to protect my system/data in the event of some sort of failure. And I want to omit the copy to the trace file.

  6. #6
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    Hi,
    You need to use double quotes

    sql "alter database backup controlfile to ''C:\oracle\control_bck.ctl''";

    regards
    anandkl
    anandkl

  7. #7
    Join Date
    Jan 2005
    Posts
    15
    Thanks,

    Can someone tell me how do I schedule a stored rman script to automatically run?

  8. #8
    Join Date
    Oct 2002
    Posts
    807
    Originally posted by razorren
    Thanks,

    Can someone tell me how do I schedule a stored rman script to automatically run?
    Use any scheduling utility - cron, at, OEM etc..

  9. #9
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    What operating system do you have and when do you want to run them?

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