Hi, I need a script, that goes out and looks at all the Datafiles
and I need to spool it to file, and I need to specify a remove command in front of it, Is there a select statment script for that
TR
Printable View
Hi, I need a script, that goes out and looks at all the Datafiles
and I need to spool it to file, and I need to specify a remove command in front of it, Is there a select statment script for that
TR
set echo on
spool datafile_status
desc v$datafile
set head off
select * from v$datafile;
desc dba_data_files
select * from dba_data_files;
exit;
But why would you like to have remove statement for a datafile?
I'm probably shooting myself in the foot, but:
set pages 0
set trimout on
spool deleteme.ksh
select 'rm -f ' || file_name from dba_data_files;
spool off
[Edited by marist89 on 12-05-2000 at 05:25 PM]
if you're spooling a sql file instead of a shell script you'll need a "!" or "host" in front of the rm.