oracle删除orcl库_Oracle11gR2--删除数据库

1. 停止ORACLE数据库

[oracle@localhost oracle]$ ps -ef|grep smon

oracle 72550 1 0 14:23 ? 00:00:00 ora_smon_orcl

oracle 76122 76045 0 16:18 pts/0 00:00:00 grep --color=auto smon

[oracle@localhost dbhome_1]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 29 19:13:07 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

SQL>

SQL>

SQL> shutdown abort

ORACLE instance shut down.

SQL> exit

2.删除相关文件

[oracle@localhost database]$ cd $ORACLE_BASE

[oracle@localhost app]$ ll

total 4008180

drwxr-x---. 3 oracle dba 4096 Jul 14 2015 admin

drwxr-x---. 6 oracle dba 4096 Dec 19 16:31 cfgtoollogs

drwxr-xr-x. 2 oracle dba 4096 Jul 14 2015 checkpoints

drwxr-xr-x. 7 oracle dba 4096 Jul 14 2015 database

drwxrwxr-x. 11 oracle dba 4096 Jul 14 2015 diag

drwxr-x---. 3 oracle dba 4096 Jul 14 2015 fast_recovery_area

drwxr-xr-x. 7 oracle dba 4096 Aug 27 2013 grid

drwxr-xr-x. 3 oracle dba 4096 Jul 14 2015 oggsource

drwxr-xr-x. 3 oracle oinstall 4096 Jul 14 2015 oracle

-rw-r--r--. 1 root root 352172376 Jul 14 2015 Oracle GoldenGate V12.1.2.1.0 for Oracle 11g on Linux x86-64.zip

drwxr-xr-x. 3 oracle oinstall 4096 Jul 14 2015 oradata

-rw-r--r--. 1 root root 1395582860 Jul 14 2015 p13390677_112040_Linux-x86-64_1of7.zip

-rw-r--r--. 1 root root 1151304589 Jul 14 2015 p13390677_112040_Linux-x86-64_2of7.zip

-rw-r--r--. 1 root root 1205251894 Jul 14 2015 p13390677_112040_Linux-x86-64_3of7.zip

[oracle@localhost app]$ cd oradata

[oracle@localhost oradata]$ ll

total 4

drwxr-x---. 2 oracle dba 4096 Dec 19 16:45 orcl

[oracle@localhost oradata]$ cd orcl

[oracle@localhost orcl]$ ll

total 3034564

-rw-r-----. 1 oracle dba 9748480 Jan 29 19:16 control01.ctl

-rw-r-----. 1 oracle dba 104865792 Jan 29 09:05 ggsdirector.dbf

-rw-r-----. 1 oracle dba 209723392 Jan 29 09:05 goldengate.dbf

-rw-r-----. 1 oracle dba 209723392 Jan 29 09:05 mycat.dbf

-rw-r-----. 1 oracle dba 52429312 Jan 29 09:00 redo01.log

-rw-r-----. 1 oracle dba 52429312 Jan 29 19:15 redo02.log

-rw-r-----. 1 oracle dba 52429312 Jan 28 23:00 redo03.log

-rw-r-----. 1 oracle dba 1121984512 Jan 29 19:11 sysaux01.dbf

-rw-r-----. 1 oracle dba 775954432 Jan 29 19:14 system01.dbf

-rw-r-----. 1 oracle dba 61874176 Jan 28 22:10 temp01.dbf

-rw-r-----. 1 oracle dba 450895872 Jan 29 19:14 undotbs01.dbf

-rw-r-----. 1 oracle dba 6561792 Jan 29 09:05 users01.dbf

[oracle@localhost orcl]$ cd ..

[oracle@localhost oradata]$ ll

total 4

drwxr-x---. 2 oracle dba 4096 Dec 19 16:45 orcl

[oracle@localhost oradata]$ rm -rf orcl

[oracle@localhost oradata]$ ll

total 0

[oracle@localhost oradata]$ cd $ORACLE_HOME

[oracle@localhost dbhome_1]$ cd dbs

[oracle@localhost dbs]$ ll

total 20

-rw-rw----. 1 oracle dba 1544 Jan 29 19:16 hc_orcl.dat

-rw-r--r--. 1 oracle dba 2851 May 15 2009 init.ora

-rw-r-----. 1 oracle dba 24 Jul 14 2015 lkORCL

-rw-r-----. 1 oracle dba 1536 Jul 14 2015 orapworcl

-rw-r-----. 1 oracle dba 2560 Jan 28 22:10 spfileorcl.ora

[oracle@localhost dbs]$ rm -rf *orcl*

[[oracle@localhost dbs]$ exit

logout

[root@localhost ~]# cat /etc/oratab

#

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by either Database Configuration Assistant while creating

# a database or ASM Configuration Assistant while creating ASM instance.

# 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::

#

# 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.

#

#

orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N

[root@localhost usr]# rm -rf /etc/oratab

[root@localhost ~]# cat /etc/oraInst.loc

inventory_loc=/home/oracle/oraInventory

inst_group=dba

[root@localhost ~]# cd /home/oracle/oraInventory

[root@localhost oraInventory]# ll

total 20

drwxrwx---. 2 oracle dba 4096 Jul 14 2015 ContentsXML

drwxrwx---. 2 oracle dba 4096 Jul 14 2015 logs

-rw-rw----. 1 oracle dba 55 Jul 14 2015 oraInst.loc

-rwxrwx---. 1 oracle dba 1636 Jul 14 2015 orainstRoot.sh

drwxrwx---. 2 oracle dba 4096 Jul 14 2015 oui

[root@localhost oraInventory]# cd ContentsXML

[root@localhost ContentsXML]# ll

total 12

-rw-rw----. 1 oracle dba 329 Jul 14 2015 comps.xml

-rw-rw----. 1 oracle dba 488 Jul 14 2015 inventory.xml

-rw-rw----. 1 oracle dba 292 Jul 14 2015 libs.xml

[root@localhost ContentsXML]# cat

comps.xml inventory.xml libs.xml

[root@localhost ContentsXML]# cat inventory.xml

11.2.0.4.0

2.1.0.6.0

[root@localhost ContentsXML]# rm -rf inventory.xml

[root@localhost ~]# rm -rf /home/oracle/app/oracle/product/11.2.0/dbhome_1/*

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值