All database files needed for cold backup
Description
This script lists all the Windows NT database datafiles,
control files and redo log
files which make up the database. This list is a list of the
files to be copied in
a full database backup.
Parameters
backup_path (-ie- c:\oracle\backup\ )
Source
======
undefine backup_path
set head off
select 'copy '||name||' &&backup_path'||substr(name,instr(name,
'\', -1)+1 ) fname
from v$datafile df, v$filestat fs
where df.file# = fs.file#
UNION
select 'copy '||name||' &&backup_path'||substr(name,instr(name,
'\', -1)+1 ) fname
from v$controlfile
UNION
select 'copy '||lgf.member||' &&backup_path'||substr(lgf.member,instr(lgf.member,
'\', -1)+1 ) fname
from v$logfile lgf, v$log lg
where lgf.group# = lg.group#
order by 1
spool c:\temp\backup.bat
/
c:\temp\
spool off
|