oracle手工刪除庫

來源:互聯網
上載者:User

標籤:oracle   這一   允許   tab   會話   查看   windows   查詢   包含   

無法使用圖形介面時,我們需要手動刪除資料庫一、手動刪除檔案系統資料庫

   1.停止監聽,防止有新的串連產生,同時,在資料庫配置了em的,也需要停止


       $ lsnrctl stop listener_name


       $ emctl stop dbconsole


   2.獲得資料檔案,記錄檔及控制檔案的相關資訊,包含歸檔      


       $ sqlplus /as sysdba


       SQL>show parameter control

       擷取控制檔案的路徑 

       SQL>select file_name from dba_data_files;

       擷取資料檔案的位置

       SQL>select * from v$logfile;

       擷取記錄檔的位置

       SQL>archive log list; 

       擷取歸檔日誌的路徑

       SQL>shutdown immediate(abort);

       關閉資料庫,反正都要刪除了,可以考慮用abort  


   3.啟動到mount狀態(使用exclusive restart)


       SQL> startup mount exclusive restrict;

       mount資料庫到獨佔模式

       SQL> show parameter instance;

       查看是否是要刪除的執行個體,這一步非常重要,。


   4.修改參數為允許受限的會話模式


       SQL>alter system enable restricted session;


   5.使用drop database命令來清除資料庫


       SQL>drop database;


       SQL>exit


   6.手動清除相關檔案


       根據第2步查詢的結果,刪除相應的檔案。

       windows可以開啟視窗,進入目錄刪除。linux可以使用rm刪除


   7.清除監聽相關檔案

       11G以後,很多是動態註冊的,所以不用考慮這一步。如果配置了靜態監聽的,需要刪除listener.ora檔案裡的配置


   8.修改oratab檔案以及.bash_profile

      


oracle手工刪除庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.