Logo

SQL Script

Database Datafile listing

Tested on Oracle 8.1

Updated : 18-Mar-2002
Version : 2.0

Description

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.

Parameters

None.

SQL Source

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

Previous Oracle Version Links

Database Datafile listing

Return to Index of SQL Scripts


Home | Company Profile | Services | Contact Us | SQL scripts and tips | Quiz
Legal

Logo