Logo

SQL Script

Database Datafile listing

Tested on Oracle 8.0 Tested on Oracle 7

Updated : 1-June-1998
Version : 1.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. 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 a50
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;

spool off

Return to Index of SQL Scripts


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

Logo