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

Thread: Backup strategy.

  1. #1
    Join Date
    Jan 2006
    Location
    Bangalore,IND
    Posts
    47

    Question Backup strategy.

    I have enabled export on my new sun server based oracle db.

    I know that its not the right way to backup, hence i am going to enable hotbackups and after getting backup server will go for RMAN is my road map to backup.

    My question here is how shall i write the shell script to automate?

    I have more than 100 tablespaces, i find putting all the tablespaces into begin backup mode in script (more than 300 lines)will not make sense. Is there any way to put all the tablespace in backup mode by looping them making the script small and easy?

    Appreciate any help on this part as i did not find much in googling(particularly an unix script).

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    begin
    for i in (select tablespace_name from dba_tablespaces) loop;
    execute immediate 'alter tablespace '||i.tablespace_name||' begin backup';
    end loop;
    end;
    /


    then watch your redo usage shoot through the roof.

    if you ar eon 10g you can do alter database begin backup;

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Don't waste your time with scripted backups. If you don't have an rman catalog, the controlfile will keep enough history to have a decent backup strategy.

    http://marist89.blogspot.com/2005/05/backup-top-11.html
    Jeff Hunter

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