Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Dynamically generate sql for hot backup

Dynamically generate sql for hot backup

From: Dmitry Vays <dimaweiss_at_home.com>
Date: Tue, 23 Jan 2001 05:58:18 GMT
Message-ID: <_39b6.164587$w35.29679886@news1.rdc1.nj.home.com>

Hi everybody,
I have this script
select 'alter tablespace ' || tablespace_name || ' begin backup; ' ,  '! cp ' || file_name || ' $ORA_HOT ', 'alter tablespace ' || tablespace_name || ' end backup
 from dba_data_files

IT WILL PRODUCE THE FOLLOWING : alter tablespace SYSTEM begin backup;
! cp /data1/oradata/eccp/system01.dbf $ORA_HOT
alter tablespace SYSTEM end backup;

alter tablespace RBS begin backup;
! cp /log1/eccp/rbs01.dbf $ORA_HOT

alter tablespace RBS end backup;

alter tablespace RBS begin backup;
! cp /log2/eccp/rbs02.dbf $ORA_HOT

alter tablespace RBS end backup;

alter tablespace USERS begin backup;
! cp /data1/oradata/eccp/users01.dbf $ORA_HOT
alter tablespace USERS end backup;

If you notice I have 2 datafiles for RBS tablespace.

Can anobody help my to achieve the following result:

alter tablespace RBS begin backup;
! cp /log1/eccp/rbs01.dbf $ORA_HOT
! cp /log2/eccp/rbs02.dbf $ORA_HOT

alter tablespace RBS end backup;

Dima Received on Mon Jan 22 2001 - 23:58:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US