linux下手动删除数据库实例

others 专栏收录该内容
505 篇文章 0 订阅

原 linux下手动删除数据库实例https://blog.csdn.net/tianlesoftware/article/details/4813078版权声明: https://blog.csdn.net/tianlesoftware/article/details/4813078
   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]$https://img-blog.csdnimg.cn/20190217105710569.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3UwMTEwNzgxNDE=,size_16,color_FFFFFF,t_70

  • 0
    点赞
  • 1
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值