ibanes.com 
                        Home | DBA Tips | DBA Scripts | CV | Contact
News

Others

 

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


Oracle Sites

» Oracle Base
» Ask Tom
» DBA Support
» DBA Click
» Dbazine
» SamOraTech
» OraFaq
» SearchDatabase
» Ixora
» DBA on Call
» VS Babu
» OraPub
» Oracle Advice
» Quest Pipelines
» Oracle Professionals
» Jeff Hunter's Site
Links
» The First Resource Repository

Hosted by www.Geocities.ws

1