{"id":86,"date":"2008-08-21T16:42:07","date_gmt":"2008-08-21T20:42:07","guid":{"rendered":"http:\/\/www.dev-notes.com\/blog\/2008\/08\/21\/manually-deleting-an-oracle-11g-database\/"},"modified":"2008-08-21T16:42:07","modified_gmt":"2008-08-21T20:42:07","slug":"manually-deleting-an-oracle-11g-database","status":"publish","type":"post","link":"https:\/\/www.dev-notes.com\/blog\/2008\/08\/21\/manually-deleting-an-oracle-11g-database\/","title":{"rendered":"Manually deleting an Oracle 11g database"},"content":{"rendered":"<p>The following steps outlines how to manually delete a database within Oracle 11g, running in an Linux environment.  I am currently running Oracle&#8217;s Enterprise Linux release 5 update 2.<\/p>\n<ul>\n<li>Use SQL*Plus or your favorite SQL command line tool to log in to the target database; log in as sysdba<\/li>\n<li>Issue the following commands to get the path to various files\n<pre class=\"code\">\nselect name from v$datafile;\nselect member from v$logfile;\nselect name from v$controlfile;\nselect name from v$tempfile;\n<\/pre>\n<\/li>\n<li>Shut down the database within SQL*Plus, and then exit out of SQL*Plus\n<pre class=\"code\">\nshutdown immediate;\nquit;\n<\/pre>\n<\/li>\n<li>Stop the listener service by issuing the following command in the terminal prompt:\n<pre class=\"code\">lsnrctl stop<\/pre>\n<\/li>\n<li>Recall the file paths found earlier; use them as a check list as you delete each one of those files.  Reminder: did you back up your database yet?  When ready, go ahead delete your data files, redo log files, control files, and temp files.<\/li>\n<li>Go to the $ORACLE_HOME\/network\/admin directory and delete the tnsnames.ora and listener.ora files<\/li>\n<li>Go to the $ORACLE_HOME\/dbs directory and delete the init[db_name].ora, orapw[db_name], and spfile[db_name].ora files<\/li>\n<li>Go to the $ORACLE_HOME\/admin\/[db_name]\/pfile directory and delete the init[db_name].ora file<\/li>\n<li>Go to the $ORACLE_HOME\/admin\/[db_name]\/adump directory and delete all files in that directory<\/li>\n<li>Edit the file \/etc\/oratab by removing the line that starts with your database name<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This article details the step-by-step for manually removing a database in Oracle 11g, noting specific files that need to be removed and\/or edited for a clean deletion.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":0,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}