<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how can I drop a database in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934036#M934823</link>
    <description>As others have already pointed out, you can find the datafiles from the data dictionary.&lt;BR /&gt;&lt;BR /&gt;You might find it handy to:&lt;BR /&gt;&lt;BR /&gt;sqlplus &lt;BR /&gt;&lt;BR /&gt;connect / as sysdba&lt;BR /&gt;&lt;BR /&gt;spool destroy_the_world.sh&lt;BR /&gt;&lt;BR /&gt;SELECT 'rm -f'||file_name from dba_data_files;&lt;BR /&gt;&lt;BR /&gt;spool off&lt;BR /&gt;&lt;BR /&gt;shutdown abort &lt;BR /&gt;&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;at the shell prompt, su to root. (After all, root should be the only one allowed to destroy the world)&lt;BR /&gt;&lt;BR /&gt;chmod +x destroy_the_world.sh&lt;BR /&gt;&lt;BR /&gt;destroy_the_world.sh&lt;BR /&gt;&lt;BR /&gt;Using this technique with the other respondents' suggestions for finding files allows you to generate scripts of mass destruction so that if you are just playing with the database creation and destruction, things will be simplier.  BTW I've found through years of screwing up, that it's always a good idea to make an off-line backup of the database. In case you change your mind.&lt;BR /&gt;&lt;BR /&gt;Rule #1 in computer science.....&lt;BR /&gt;Never do _anything_ you can't undo.&lt;BR /&gt;&lt;BR /&gt;-Good Luck&lt;BR /&gt;</description>
    <pubDate>Tue, 25 Mar 2003 14:17:54 GMT</pubDate>
    <dc:creator>R. Allan Hicks</dc:creator>
    <dc:date>2003-03-25T14:17:54Z</dc:date>
    <item>
      <title>how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934027#M934814</link>
      <description>Hi,&lt;BR /&gt;I would like to drop a database.&lt;BR /&gt;I did:&lt;BR /&gt;&lt;BR /&gt;drop database namedatabase;&lt;BR /&gt;&lt;BR /&gt;but it doesn't work.&lt;BR /&gt;How can I do?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Mon, 24 Mar 2003 14:39:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934027#M934814</guid>
      <dc:creator>Giada Bonfà</dc:creator>
      <dc:date>2003-03-24T14:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934028#M934815</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;- shutdown the database 'shutdown abort'&lt;BR /&gt;- delete all datafiles, init&lt;SID&gt;.ora, redologs, archives, ...&lt;BR /&gt;&lt;BR /&gt;Chris&lt;/SID&gt;</description>
      <pubDate>Mon, 24 Mar 2003 14:45:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934028#M934815</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2003-03-24T14:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934029#M934816</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If your database is of oracle:&lt;BR /&gt;login as oracle&lt;BR /&gt;&lt;BR /&gt;$ export DISPLAY=&lt;DESK top="" ip=""&gt;:0.0&lt;BR /&gt;$dbca (if oracle is 9i)&lt;BR /&gt;choose delete a database&lt;BR /&gt;&lt;BR /&gt;if  oracle 8i&lt;BR /&gt;$svrmgrl&lt;BR /&gt;svrmgrl&amp;gt; connect internal&lt;BR /&gt;svrmgrl&amp;gt; shudown database &lt;DATABASE name=""&gt;&lt;BR /&gt;svrmgrl&amp;gt; drop database &lt;DATABASENAME&gt;&lt;BR /&gt;&lt;BR /&gt;If database is DB2:&lt;BR /&gt;Login as DB2 user id&lt;BR /&gt;&lt;BR /&gt;$db2 "force application all"&lt;BR /&gt;$db2 " drop database &lt;DATABASE name=""&gt;"&lt;BR /&gt;&lt;BR /&gt;&lt;/DATABASE&gt;&lt;/DATABASENAME&gt;&lt;/DATABASE&gt;&lt;/DESK&gt;</description>
      <pubDate>Mon, 24 Mar 2003 14:56:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934029#M934816</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2003-03-24T14:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934030#M934817</link>
      <description>If you want to drop database in Oracle, all you need to do is shutdown the database instance, remove references to the database and to remove all files that are associated with the database.&lt;BR /&gt;&lt;BR /&gt;Do the following:&lt;BR /&gt;01. Login as connect / as sysdba at svrmgrl&lt;BR /&gt;02. startup the database if it's not already started. The database must at least mounted.&lt;BR /&gt;03. spool /tmp/deletelist.lst&lt;BR /&gt;04. select name from v$datafile; (This will get all the datafiles; alternatively, you can select file_name from dba_data_files) &lt;BR /&gt;05. select member from v$logfile;&lt;BR /&gt;06. select name from v$controlfile;&lt;BR /&gt;07. archive log list (archive_log_dest is where the archived destination is)&lt;BR /&gt;08. locating ifile by issuing show parameter ifile (alternatively, check the content of init.ora)&lt;BR /&gt;09. spool off &lt;BR /&gt;10. Delete in O/S level the files listed in /tmp/deletelist.lst&lt;BR /&gt;11. remove all the entries which refer to the deleted database in tnsnames.ora and listener.ora (located in $ORACLE_HOME/network/admin) &lt;BR /&gt;12. remove all database links referring to the deleted database.&lt;BR /&gt;13. check "/var/opt/oracle/oratab" to make sure there is no entry of the database deleted. If yes, remove it.&lt;BR /&gt;14. DONE &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sergejs</description>
      <pubDate>Mon, 24 Mar 2003 15:02:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934030#M934817</guid>
      <dc:creator>Sergejs Svitnevs</dc:creator>
      <dc:date>2003-03-24T15:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934031#M934818</link>
      <description>It depends if you want to delete the database completey and do not want to go back to this SID any more.&lt;BR /&gt;&lt;BR /&gt;If you do not need this SID any more and do not intend to create a new one of the same name then the simple procedure is.&lt;BR /&gt;&lt;BR /&gt;1. Shutdown the database.&lt;BR /&gt;2. Physically delete the data (.dbf) file, redo logs, control files (.ctl). &lt;BR /&gt;3. Physically remove the links for the init ora file and configuration files.&lt;BR /&gt;4. Remove the entry in the oratab file.&lt;BR /&gt;&lt;BR /&gt;If you need to clean up this database and then intend to create a new one like this, please refer to the attachment which has a step by step procedure for delete a oracle database in UNIX environment.&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Mar 2003 05:24:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934031#M934818</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-03-25T05:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934032#M934819</link>
      <description>check your ORACLE_SID and ORACLE_HOME. &lt;BR /&gt;Make sure that you are pointing the right ORACLE_SID &lt;BR /&gt;&lt;BR /&gt;01. $svrmgrl &lt;BR /&gt;02. startup the database if it's not already started. The database must at least mounted. &lt;BR /&gt;svrmgrl&amp;gt;startup mount &lt;BR /&gt;03. spool /databasefiles.lst &lt;BR /&gt;svrmgrl&amp;gt;spool databasefiles.lst &lt;BR /&gt;04. select name from v$datafile; (This will get all the datafiles; alternatively, you can select file_name from dba_data_files) &lt;BR /&gt;svrmgrl&amp;gt;select name from v$datafile; &lt;BR /&gt;05. select member from v$logfile; &lt;BR /&gt;svrmgrl&amp;gt;select * from v$logfile; &lt;BR /&gt;06. select name from v$controlfile; &lt;BR /&gt;svrmgrl&amp;gt;select * from v$controlfile; &lt;BR /&gt;07. archive log list (archive_log_dest is where the archived destination is) &lt;BR /&gt;svrmgrl&amp;gt;archive log list; &lt;BR /&gt;Go to the destination directory of archive_log_dest parameter and remove all the files. &lt;BR /&gt;08. locating ifile by issuing show parameter ifile (alternatively, check the content of init.ora) &lt;BR /&gt;09. spool off &lt;BR /&gt;svrmgrl&amp;gt;spool off &lt;BR /&gt;10. Delete in O/S level the files listed in databasefiles.lst &lt;BR /&gt;11. remove all the entries which refer to the deleted database in tnsnames.ora and listener.ora (located in $ORACLE_HOME/network/admin) &lt;BR /&gt;12. remove all database links referring to the deleted database. &lt;BR /&gt;13. check "/var/opt/oracle/oratab" to make sure there is no entry of the database deleted. If yes, remove it. &lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 25 Mar 2003 05:43:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934032#M934819</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-03-25T05:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934033#M934820</link>
      <description>If you installed Database Configuration Assistant, use it for delete your database.</description>
      <pubDate>Tue, 25 Mar 2003 05:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934033#M934820</guid>
      <dc:creator>Alexander E. Ivanov</dc:creator>
      <dc:date>2003-03-25T05:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934034#M934821</link>
      <description>hello,&lt;BR /&gt;&lt;BR /&gt;to add to all those post above, i would recommend that you do a backup first, just in case...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so my steps would be:&lt;BR /&gt;Get an error free Export of the entire database before I dropped it. Just in case someone needs any data from that database after it's gone. &lt;BR /&gt;&lt;BR /&gt;With the database running issue and spool the following select statements. &lt;BR /&gt;&lt;BR /&gt;Make sure you are on the correct database: &lt;BR /&gt;SELECT name from v$database; &lt;BR /&gt;&lt;BR /&gt;Get a list of all the data files for this database. &lt;BR /&gt;SELECT file_name from dba_data_files; &lt;BR /&gt;&lt;BR /&gt;Find the control files for this database: &lt;BR /&gt;SELECT name, value from V$parameter &lt;BR /&gt;where lower(name) like '%control_files%'; &lt;BR /&gt;&lt;BR /&gt;Shutdown the database. &lt;BR /&gt;&lt;BR /&gt;Use Database Configuration Assistant to drop the database&lt;BR /&gt;&lt;BR /&gt;delete the datafiles. &lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Tue, 25 Mar 2003 06:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934034#M934821</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-03-25T06:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934035#M934822</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the easiest way to drop database in oracle is do it through GUI.&lt;BR /&gt;login as a oracle(oracle owner) user&lt;BR /&gt;export your display and run dbassist &lt;BR /&gt;same tool u can use for creating databse also.&lt;BR /&gt;&lt;BR /&gt;Sunil</description>
      <pubDate>Tue, 25 Mar 2003 08:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934035#M934822</guid>
      <dc:creator>Sunil Sharma_1</dc:creator>
      <dc:date>2003-03-25T08:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: how can I drop a database</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934036#M934823</link>
      <description>As others have already pointed out, you can find the datafiles from the data dictionary.&lt;BR /&gt;&lt;BR /&gt;You might find it handy to:&lt;BR /&gt;&lt;BR /&gt;sqlplus &lt;BR /&gt;&lt;BR /&gt;connect / as sysdba&lt;BR /&gt;&lt;BR /&gt;spool destroy_the_world.sh&lt;BR /&gt;&lt;BR /&gt;SELECT 'rm -f'||file_name from dba_data_files;&lt;BR /&gt;&lt;BR /&gt;spool off&lt;BR /&gt;&lt;BR /&gt;shutdown abort &lt;BR /&gt;&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;at the shell prompt, su to root. (After all, root should be the only one allowed to destroy the world)&lt;BR /&gt;&lt;BR /&gt;chmod +x destroy_the_world.sh&lt;BR /&gt;&lt;BR /&gt;destroy_the_world.sh&lt;BR /&gt;&lt;BR /&gt;Using this technique with the other respondents' suggestions for finding files allows you to generate scripts of mass destruction so that if you are just playing with the database creation and destruction, things will be simplier.  BTW I've found through years of screwing up, that it's always a good idea to make an off-line backup of the database. In case you change your mind.&lt;BR /&gt;&lt;BR /&gt;Rule #1 in computer science.....&lt;BR /&gt;Never do _anything_ you can't undo.&lt;BR /&gt;&lt;BR /&gt;-Good Luck&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Mar 2003 14:17:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-drop-a-database/m-p/2934036#M934823</guid>
      <dc:creator>R. Allan Hicks</dc:creator>
      <dc:date>2003-03-25T14:17:54Z</dc:date>
    </item>
  </channel>
</rss>

