Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to drop a database

RE: How to drop a database

From: Glenn Travis <Glenn.Travis_at_wcom.com>
Date: Thu, 01 Feb 2001 14:37:26 -0800
Message-ID: <F001.002A840E.20010201142733@fatcity.com>

What is usually in dba_temp_files? Mine has zero rows (all day). If you shutdown and restart Oracle, will this table be empty?

> -----Original Message-----
> From: Igor Polishchuk [mailto:ipolishchuk_at_digitalthink.com]
> Sent: Tuesday, January 30, 2001 9:38 PM
> To: 'Glenn Travis'; Woody Mckay; ORACLE-L_at_fatcity.com;
> oracledba_at_lazydba.com
> Subject: RE: How to drop a database
>
>
> Hi Glenn
> You missed temporary files, that may be associated with database
> Velow is my script that creates script for database deleting and includes
> temporary files too. But it is necessary to be careful with it :)
>
> # This script shutdown current database and delete all files for
> #c # this
> database
> #
> #
> sqlplus -s internal << EOF
> spool _rm_files.sh
> set head off feedback off pages 0
>
> select 'rm '|| file_name
> from dba_data_files;
>
> select 'rm '|| file_name
> from dba_temp_files;
>
> select 'rm '|| name
> from v\$controlfile;
>
> select 'rm '|| member
> from v\$logfile;
>
> prompt rm $ORACLE_HOME/dbs/orapw$ORACLE_SID
>
> spool off
>
> shutdown abort
>
> EOF
>
> chmod u+x ./_rm_files.sh
>
> #./_rm_files.sh
>
>
>
> Igor Polishchuk
> IT department
> DigitalThink
> (415) 625 4285
> e-mail: ipolishchuk_at_digitalthink.com
>
>
> -----Original Message-----
> From: Glenn Travis [mailto:Glenn.Travis_at_wcom.com]
> Sent: Tuesday, January 30, 2001 11:06 AM
> To: Woody Mckay; ORACLE-L_at_fatcity.com; oracledba_at_lazydba.com
> Subject: RE: How to drop a database
>
>
> 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:rgramolini_at_tax.state.vt.us]
> > Sent: Tuesday, January 30, 2001 1:08 PM
> > To: Woody Mckay; ORACLE-L_at_fatcity.com; oracledba_at_lazydba.com
> > 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" <wmckay_at_hydrogenmedia.com>
> > To: <ORACLE-L_at_fatcity.com>; <oracledba_at_lazydba.com>
> > 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
> oracledba-unsubscribe_at_LAZYDBA.com
> > > to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
> > > 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 oracledba-unsubscribe_at_LAZYDBA.com
> > to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
> > 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 oracledba-unsubscribe_at_LAZYDBA.com
> to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
> 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: Glenn.Travis_at_wcom.com

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: ListGuru_at_fatcity.com (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).
Received on Thu Feb 01 2001 - 16:37:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US