Online Backup
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Online Backup

  1. #1
    Join Date
    Mar 2001
    Posts
    131

    Red face

    Hello,

    Can any one send me perfact script of Online Oracle DB Backup. I want that script to backup all files like, Redo logs, Datafiles, Control file and parameter file.

    Actually i have seen a good script in Backup & Recovery book by Oracle Press but i am at client side and don't have right now.

    Thanks.

    UpeshP

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Mar 2001
    Posts
    131
    any other solution also please.

    Thanks

  4. #4
    Join Date
    Aug 2001
    Posts
    184
    oh, sure, let me go out and by that book and type in the script for you.... U willing to split yur consulting fee?
    OCP DBA 8i
    ocpwannabe@yahoo.com
    -----------------------------
    When in doubt, pick 'C'.

  5. #5
    Join Date
    Feb 2002
    Posts
    13
    Here is one geared toward NT.

    /**********************************************************************
    Run this script through SQLPLUS and it will prompt you for 2 values
    1: HOT_BACK_DIR : defines the directory to which the hot backup is written
    2: SCRIPT_FILE : Hot Backup Script for your environment
    ****************************** DO NOT DELETE*********************/
    define HOT_BACK_DIR = &1
    define SCRIPT_FILE = &2
    truncate TABLE wr_hot_stage;
    INSERT INTO wr_hot_stage
    SELECT tablespace_name, '1' counter, '' file_id, sysdate bkup_date,
    'alter tablespace '|| tablespace_name||' begin backup;' datum
    FROM dba_tablespaces;
    INSERT INTO wr_hot_stage
    SELECT tablespace_name, '2' counter, file_id, sysdate bkup_date,
    'host ocopy80 '||file_name||' &HOT_BACK_DIR' || '\' ||
    substr((rtrim(file_name,'.DBF')),instr(file_name,'\',-1,1)+1)||'.BAK' datum
    FROM dba_data_files;
    INSERT INTO wr_hot_stage
    SELECT tablespace_name, '3' counter, '' file_id, sysdate bkup_date,
    'alter tablespace '|| tablespace_name||' end backup;' datum
    FROM dba_tablespaces;
    /**** Set up the parameters for the spool file */
    SET feedback off heading off
    SET pagesize 0 linesize 150
    SET verify off termout on echo off
    SPOOL &SCRIPT_FILE
    SELECT datum FROM wr_hot_stage
    ORDER BY tablespace_name, counter;
    SELECT 'alter system switch logfile; ' FROM dual;
    SELECT 'alter database backup controlfile to trace; ' FROM dual;
    SELECT 'alter database backup controlfile to ''&HOT_BACK_DIR\control.bak''; ' FROM dual;
    SELECT 'parfile to ''&HOT_BACK_DIR\parfile.bak''; ' FROM dual;
    SELECT 'exit' FROM dual;
    SPOOL off


  6. #6
    Join Date
    Dec 2001
    Location
    SAN FRANCISCO, CA
    Posts
    306
    boss

    if i were at clients place i would store all neccessary books on my desk where i work for ready reference.

    U never know what problems come / and what u need when at clients place.

    I usually do this.

    --Pravin
    Eat , Drink & Enjoy life -

    pravin_kini@hotmail.com

  7. #7
    Join Date
    Mar 2001
    Posts
    131
    Dear don't add extra comments, this is just a question of help......don't have to buy anything, nothing doing......

    Thanks

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