Here is another version I use on Unix.  The script generate a file with
remove statements for all the database datasets.  Just pass the script a
name to use for the output script file.  It would work for DOS or NT by
changing the RM to a Del statement.  Works for me!

set feedback off;
set heading off;
spool &1
select 'rm '||name
from   sys.v_$controlfile
/
select 'rm '||member
from sys.v_$logfile
/
select 'rm '||file_name
from   sys.dba_data_files
order by file_id
/
spool off;


-----Original Message-----
Sent: Tuesday, January 30, 2001 1:11 PM
To: Multiple recipients of list ORACLE-L


Here's a script I wrote to list all the files associated with the database.
List, did I miss any?
_______________________
break on today
column today noprint new_value xdate
select substr(to_char(sysdate,'fmMonth DD, YYYY HH:MI:SS P.M.'),1,35) today
from dual;
column name noprint new_value dbname
column created noprint new_value dbcreated
column host_name noprint new_value hostname
select name,created from v$database;
select host_name from v$instance;

spool &dbname..&hostname..databasefiles.out

prompt Date:      &xdate
prompt DATABASE:  &dbname
prompt HOST:      &hostname
prompt Created:   &dbcreated
prompt
prompt ****************************
prompt *****  Database Files  *****
prompt ****************************
prompt

set head off echo off pagesize 0 trimspool on feed off linesize 132

clear columns
col ftype format a15
col tbspc format a20
col fname format a50

select 'Controlfile' ftype, name fname , ' ' tbspc
  from SYS.V_$CONTROLFILE
union
select 'Logfile' ftype, member fname, ' ' tbspc
  from SYS.V_$LOGFILE
union
select 'Tablespace' ftype, file_name fname, '('||tablespace_name||')' tbspc
  from DBA_DATA_FILES
order by 2;

spool off
prompt
prompt Output in &dbname..&hostname..databasefiles.out
prompt
quit
_____________________


> -----Original Message-----
> From: Ruth Gramolini [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 30, 2001 1:08 PM
> To: Woody Mckay; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: How to drop a database
>
>
> There  is not command to drop a database.  You just have to remove all of
> the files associated with that database: control files, datafiles, etc.
>
> Ruth
> ----- Original Message -----
> From: "Woody Mckay" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, January 30, 2001 12:51 PM
> Subject: How to drop a database
>
>
> > Hello all,
> >
> > Sorry to ask what might be a dumb question, but a friend wants to drop a
> > test database (Solaris/Oracle 8.1.7) and I can't seem to find the right
> > command(s).
> >
> > Would it be a series of alter database drop xxx?
> >
> > Thanks for any help.
> >
> > Woody
> >
> >
> > --------
> > Think you know someone who can answer the above question? Forward it to
> them!
> > to unsubscribe, send a blank email to [EMAIL PROTECTED]
> > to subscribe send a blank email to [EMAIL PROTECTED]
> > Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> >
>
>
> --------
> Think you know someone who can answer the above question? Forward
> it to them!
> to unsubscribe, send a blank email to [EMAIL PROTECTED]
> to subscribe send a blank email to [EMAIL PROTECTED]
> Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Glenn Travis
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Smith, Ron L.
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to