online tablespace backup
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: online tablespace backup

  1. #1
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    Hi friends,
    Can any one of you help me in writing a pl/sql program for taking a tablespace online bakup,copy the datafiles to another folder and ending the tablespace backup.

    And one more than can we use the HOST command in PL/SQL, if yes please give me an example.

    regards
    anandkl
    anandkl

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    It is NOT a good idea to have PL/SQL procedure to do online backup.

  3. #3
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Tamilselvan is right. I would suggest that you start using RMAN for backups (and recovery).


    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

  4. #4
    Join Date
    Feb 2001
    Location
    Scotland
    Posts
    200
    My databases run on NT4, and I would use a script file similar to the following,obviously my script is much larger, but this is what it does.

    Hope this helps.

    Allie

    rem shutpcgg_hot.sql
    rem
    rem
    spool d:\oradba\admin\pcgg\logbook\hot_pcgg.log;
    rem
    rem
    set echo on;
    alter database backup controlfile to trace;
    alter system switch logfile;
    rem ********************************************************
    alter tablespace AMAPP begin backup;
    host copy/v D:\ORADATA\PCGG\AMAPP.DBF d:\oradba\admin\pcgg\backup\AMAPP.DBF
    alter tablespace AMAPP end backup;
    rem ********************************************************
    alter tablespace AMLARGE begin backup;
    host copy/v D:\ORADATA\PCGG\AMLARGE.DBF d:\oradba\admin\pcgg\backup\AMLARGE.DBF
    alter tablespace AMLARGE end backup;
    rem ********************************************************
    alter system switch logfile;
    spool off;
    exit;
    What's the sound of one hand clapping - "CL"

  5. #5
    Join Date
    Sep 2000
    Posts
    96
    I run a script for online backups (in Windows NT and 2000)very similar to the one you posted. I have it set up as a .bat file that is scheduled to run at specific times during the day. Works well for us....

  6. #6
    Join Date
    Nov 2000
    Posts
    224
    I would advise to write PL/SQL procedure to generate script and then use the script to perform your online backups.
    If you want to backup single tablespace or complete backup you can code PL/SQL procedure accordingly and make it generate the required scripts.
    Call both the execution of PL/SQL procedure and backup script in a SQL script.

  7. #7
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    I think this is what you're looking for...

    http://www.dbasupport.com/forums/sho...threadid=22155


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