Oracle命令--数据库实例删除

 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]$

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值