linux下刪除oracle資料庫執行個體

來源:互聯網
上載者:User

1、停止服務

首先用命令 lsnrctl stop 

然後運行

 sqlplus /nolog 

      sql>   conn / as sysdba

      sql>   shutdown


2、查看執行個體進程並刪除

find $ORACLE_BASE/ -name $ORACLE_SID

/mnt/installer/oracle/flash_recovery_area/orcl
/mnt/installer/oracle/oradata/orcl
/mnt/installer/oracle/diag/rdbms/orcl
/mnt/installer/oracle/diag/rdbms/orcl/orcl
/mnt/installer/oracle/admin/orcl
/mnt/installer/oracle/cfgtoollogs/dbca/orcl

[oracle@rt1d20 /]$ rm -rf /mnt/installer/oracle/flash_recovery_area/orcl/
[oracle@rt1d20 /]$ rm -rf /mnt/installer/oracle/oradata/orcl/
[oracle@rt1d20 /]$ rm -rf /mnt/installer/oracle/diag/rdbms/orcl/
[oracle@rt1d20 /]$ rm -rf /mnt/installer/oracle/admin/orcl/
[oracle@rt1d20 /]$ rm -rf /mnt/installer/oracle/cfgtoollogs/dbca/orcl/


find $ORACLE_BASE/* -name '*[Bb][Tt][Ss][Dd][Bb]2*' | grep -v admin| grep -v  oradata

如果沒有則跳過

$ cd mnt/installer/oracle/

$ ll

drwxr-x--- 2 oracle oinstall 4096 Jan  8 16:50 admin
drwxr-xr-x 4 oracle oinstall 4096 Jan  7 23:12 cfgtoollogs
drwxr-xr-x 2 oracle oinstall 4096 Jan  7 23:15 checkpoints
drwxrwxr-x 4 oracle oinstall 4096 Jan  7 23:12 diag
drwxr-x--- 3 oracle oinstall 4096 Jan  8 16:49 flash_recovery_area
drwxr-x--- 2 oracle oinstall 4096 Jan  8 16:49 oradata
drwxrwx--- 5 oracle oinstall 4096 Jan  7 21:06 oraInventory
drwxr-xr-x 3 oracle oinstall 4096 Jan  7 21:03 product


[oracle@rt1d20 oracle]$ rm -rf admin/
[oracle@rt1d20 oracle]$ rm -rf flash_recovery_area/
[oracle@rt1d20 oracle]$ rm -rf oradata/

3、刪除舊的執行個體配置項

vi etc/oratab 

刪除最後一行:orcl:/mnt/installer/oracle/product/11.2.0/db_1:N


最後再重新靜默安裝資料庫執行個體

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.