SQL ScriptDatabase Datafile listing |
This script lists all the database datafiles, control files and redo log files which make up the database. This list is a definitive list of the files to be copied in a full cold database backup. Remember that TEMPFILES do not need to be backed-up.This script could easily be modified to automate a cold database backup.
None.
set pages 100 col file_name form a60 col name form a60 col member form a55 col group# form 999 col m0 form 99999 heading "Size (Mb)" spool datafile.lst select file_name,bytes/(1024*1024) m0 from dba_data_files; select NAME,status from v$controlfile; select group#,member,status from v$logfile; PROMPT PROMPT Database TEMPFILES PROMPT select file_name,bytes/(1024*1024) m0 from dba_temp_files; spool off
Return to Index of SQL Scripts
Home
|
Company Profile
|
Services
|
Contact Us
|
SQL scripts and tips
|
Quiz
|