Linux下如何手動刪除Oracle 11g資料庫

來源:互聯網
上載者:User

Linux下如何手動刪除Oracle 11g資料庫

下面的步驟會教你如何在Linux環境下手動刪除Oracle 11g資料庫。

我在CentOS 6上安裝了Oralce 11G資料庫。

使用SQLPlus或者其他你喜歡的命令列工具登入資料庫,登入使用者是sysdba*

輸入下面的命令的到不同檔案的路徑:

  1. select name from v$datafile;
  2. select member from v$logfile;
  3. select name from v$controlfile;
  4. select name from v$tempfile;

在SQLPlus中關閉資料庫,接著退出SQLPlus

  1. sqlplus "/ as sysdba"
  1. shutdown immediate;
  2. quit;

在命令列中輸入下面的命令停止監聽服務:

在Oralce Linux賬戶中:

  1. lsnrctl stop

回憶一下之前的檔案路徑;在刪除這些檔案的時候作為一個檢查項。記住:你備份了資料庫了嗎?當準備好之後,就刪除你的資料檔案吧,同樣還有你的記錄檔、控制檔案和臨時檔案。

  • 進入 $ORACLE_HOME/network/admin 目錄並刪除 tnsnames.ora 和 listener.ora 檔案;
  • 進入 $ORACLE_HOME/dbs 目錄並刪除 init[db_name].ora、 orapw[db_name]和 spfile[db_name].ora 檔案;
  • 進入 $ORACLEHOME/admin/[dbname]/pfile 目錄並刪除 init[db_name].ora 檔案;
  • 進入 $ORACLEHOME/admin/[dbname]/adump 目錄並刪除所有檔案;
  • 編輯/etc/oratab 並移除以你資料庫名字開頭的行.

這樣就好了。

Linux作業系統下完全刪除Oracle資料庫 

在CentOS 6.4下安裝Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虛擬機器中安裝步驟

Debian 下 安裝 Oracle 11g XE R2

Oracle Linux 6.5安裝Oracle 11.2.0.4 x64

相關文章

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.