linux下手動刪除資料庫執行個體

來源:互聯網
上載者:User

 

 linux下手動刪除資料庫執行個體,直接刪除相應的目錄就可以了,不多說了....

1. $ORACLE_HOME/dbs/
[oracle9@frogger dbs]$ pwd
/u01/app/oracle/product/9.2.0.1/dbs
[oracle9@frogger dbs]$ rm inittest02.ora
[oracle9@frogger dbs]$ rm orapwdtest02

2. $ORACLE_BASE/oradata/SID
[oracle9@frogger oradata]$ ls
default_demo01.dbf  default_demo99.dbf  devdb02  duke1  test01  test01_bak  test02  testdk  testqa
[oracle9@frogger oradata]$ ps -ef|grep smon
oracle9   7162     1  0  2008 ?        00:04:30 ora_smon_duke
oracle9   3313     1  0  2008 ?        00:02:30 ora_smon_testdk
oracle9   4386     1  0 Apr05 ?        00:00:07 ora_smon_test01
oracle9   4620     1  0 Apr05 ?        00:00:05 ora_smon_dvdsame
oracle9  12307  4426  0 22:53 pts/3    00:00:00 grep smon
[oracle9@frogger oradata]$ rm -rf test02
[oracle9@frogger oradata]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      455G  381G   51G  89% /
/dev/sda1              99M   15M   80M  16% /boot
none                 1004M     0 1004M   0% /dev/shm
nfs-vip.certificatesnow.com:/u07
                      455G  230G  202G  54% /u07
[oracle9@frogger oradata]$ ls
default_demo01.dbf  default_demo99.dbf  devdb02  duke1  test01  test01_bak  testdk  testqa

3. 刪除log檔案
[oracle9@frogger admin]$ ls
devdb02  duke1  test01  test02  testdk  testqa
[oracle9@frogger admin]$ pwd
/u01/app/oracle/admin
[oracle9@frogger admin]$ cd test02
[oracle9@frogger test02]$ ls
bdump  cdump  create  pfile  udump
[oracle9@frogger test02]$ cd ..
[oracle9@frogger admin]$ ls
devdb02  duke1  test01  test02  testdk  testqa
[oracle9@frogger admin]$ rm -rf test02
[oracle9@frogger admin]$ ls
devdb02  duke1  test01  testdk  testqa
[oracle9@frogger admin]$

4. 如果是用dbca建立的執行個體,則還要刪除/etc/oratab檔案中的執行個體資訊,就一行。 刪除就ok了。
/etc/oratab 運行root.sh產生的,中每一行代表一個ORACLE 執行個體,不允許有相同的名字,對已經存在的資料庫會提示是否升級等,安
裝建立資料庫的時候會去檢查這個檔案是否存在和並檢查檔案中的內容,在運行dbstart 時會檢查這個檔案,如果是Y就啟動它,是N
就不管它。
[oracle9@frogger admin]$ cd /etc
[oracle9@frogger etc]$ more oratab
#
# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
# *:/u01/app/oracle/product/9.2.0.1:N
*:/u01/app/oracle/product/9.2.0.1:N
duke:/u01/app/oracle/product/9.2.0.1:N
test02:/u01/app/oracle/product/9.2.0.1:N
[oracle9@frogger etc]$

聯繫我們

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