| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Archive Log Backup in DCL
Michael:
Here is a SQL Command File to create a hot backup script. It will have to be edited to use an vms filesystem instead of unix file systems. You will also need to add the code to get the control files and the log files. You might have to add a few "/" or semicolons, but this should get you a pretty good start.
Hope this helps:
John Hough
##################################################################set serveroutput on size 10000
select file_name,lower(tablespace_name)
from sys.dba_data_files
where instr(file_name,'temp') = 0
order by 2;
if ts_name <> prev_ts_name then
dbms_output.put_line ('#######################');
dbms_output.put_line ('# Tablespace '||ts_name||'. . .');
dbms_output.put_line ('#######################');
dbms_output.put_line ('alter tablespace '||ts_name||' begin
backup');
end if;
dbms_output.put_line ('host copy '||source_file||' '||target_dir);
prev_ts_name := ts_name;
fetch mycur into source_file,ts_name;
if ts_name <> prev_ts_name then
dbms_output.put_line ('alter tablespace '||prev_ts_name||' end
backup')
dbms_output.put_line ('alter system checkpoint');
end if;
end loop;
dbms_output.put_line ('alter tablespace '||prev_ts_name||' end
backup')
dbms_output.put_line ('alter system checkpoint');
end;
end;
/
Received on Fri Jan 31 1997 - 00:00:00 CST
![]() |
![]() |