-
how to delete a DATABASE from command prompt ?
Hello all..
I need to delete a Database (8.1.7) from command prompt...My X-server is not working for some reason....
How do we delete/drop the database from command line ?
thanks
Ron
-
hmm I suggest you to read concepts guide, there is no such delete/drop database command
-
Assuming all your datafiles are in /opt2/oradata/baddb -
as the owner of the files (oracle, oracle8, oracle9, whatever), do
rm /opt2/oradata/baddb/*
That will remove all files in the baddb directory.
If you are deleting the database (not re-using "baddb" anymore) -
rm -r /opt2/oradata/baddb
That will not only remove the files under the baddb directory, but will also remove the baddb directory.
Don't forget the control files (if you left them in $ORACLE_HOME/dbs).
Check system processes for anything to do with baddb -
ps -ef | grep baddb
Kill any remaining processes with
kill -9 (the process id you got from the ps command)
But, it sounds like you may be playing with fire by the nature of the question.
Last edited by stecal; 01-15-2003 at 04:24 PM.
-
1. Note the datafiles that make up this database
select name from v$datafile
2. Note the Control files
select name from v$controlfile
3. Shutdown the database and listener
4. Remove the files noted above
5. Remove this SID entry from
/etc/oratab
6. Remove this SID entry from
$ORACLE_HOME/network/admin/listener.ora
and
$ORACLE_HOME/network/admin/tnsnames.ora
7. Change your $ORACLE_SID env var
8. If you want to remove the oracle software, let us know... That's got tentacles.
9. Put your head between your legs and kiss your butt goodbye!
Last edited by KenEwald; 01-15-2003 at 04:30 PM.
-
Well, since we're diving in to this -
select member from v$logfile;
delete those as well
delete the init.ora file
delete the LK file in $ORACLE_HOME/dbs
-
Oh, and don't forget redo logs and archived log files.
select member from v$logfile
select value from v$parameter where name = 'log_archive_dest'
-
And don't forget files located in bdump, cdump, udump, admin, etc.
-
And trace files & alert log(s).
-
Originally posted by stecal
And trace files & alert log(s).
... have allready been deleted in your previous message (bdump, udump, ....).
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|