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:<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.
#
#
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
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.4.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb11g_home1" LOC="/home/oracle/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
[root@localhost ContentsXML]# rm -rf inventory.xml
[root@localhost ~]# rm -rf /home/oracle/app/oracle/product/11.2.0/dbhome_1/*
Oracle11gR2--删除数据库的更多相关文章
- entity framework 删除数据库出现错误的解决方法--最土但是很有效的方法
无法删除数据库,因为该数据库当前正在使用. public ChinaerContext() : base("name=ContextConn") { // Database.Set ...
- SqlServer--用代码创建和删除数据库或表
创建数据库,创建表,设置主键数据库的分离和附加MS SQLServer的每个数据库包含:1个主数据文件(.mdf)必须.1个事务日志文件(.ldf)必须.可以包含:任意多个次要数据文件(.ndf)多个 ...
- oracle使用DataBase Configuration Assistant创建、删除数据库
可以使用DataBase Configuration Assistant来创建一个心得数据库.Database Configuration Assistant简称是DBCA,是创建.配置以及管理数据库 ...
- Hive删除数据库
DROP DATABASE是删除所有的表并删除数据库的语句.它的语法如下: DROP DATABASE StatementDROP (DATABASE|SCHEMA) [IF EXISTS] data ...
- Java删除数据库中的数据
1:删除数据库中数据表中的数据同样也是一个非常用的技术,使用executeUpdate()方法执行用来做删除SQL的语句可以删除数据库表中的数据 2:本案例使用Statement接口中的execute ...
- ORACLE手工删除数据库
很多人习惯用ORACLE的DBCA工具创建.删除数据库,这里总结一下手工删除数据库实验的步骤,文中大量参考了乐沙弥的手动删除ORACLE数据库这篇博客的内容,当然还有Oracle官方相关文档.此处实验 ...
- SQLServer 命令批量删除数据库中指定表(游标循环删除)
DECLARE @tablename VARCHAR(30),@sql VARCHAR(500)DECLARE cur_delete_table CURSOR READ_ONLY FORWARD_ON ...
- SQL语句创建数据库,SQL语句删除数据库,SQL语句创建表,SQL语句删除表,SQL语句添加约束,SQL语句删除约束
创建数据库: CREATE DATABASE Test --要创建的数据库名称 ON PRIMARY ( --数据库文件的具体描述 NAME='Test_data', --主数据文件的逻辑名称 FIL ...
- Mongodb(2)创建数据库,删除数据库,创建集合,删除集合,显示文档内容
显示所有数据库列表:show dbs > show dbs local .078GB runoob .078GB > 显示当前数据库:db > db runoob > 显示所有 ...
- db2删除数据库
1.断开所有连接 db2 stop application all force 2.停止数据库 db2stop 3.删除数据库(系统管理员权限下)db2 drop 数据库name
随机推荐
- CABAC与CAVLC有什么区别?
待完善 7.3.12 用 CAVLC 方式编码的残差数据的语义 coeff_token 指明了非零系数的个数,拖尾系数的个数. trailing_ones_sign_flag 拖尾系数的符号 - ...
- POSIX线程同步
在posix编程中,如果在不同的线程中几乎同一时间操作同一个变量的时候,就会出现不同步. 如何解决这样的问题,这里需要用到互斥量,互斥锁的概念.请看UNIX环境高级编程P299页 #include & ...
- Markdown转HTML之Node篇
前言 环境及编码 搭建环境 express markdown-it commander rd 核心编码 cmd_preview模块 cmd_build模块 打造命令行工具 写点xxmd 演示 总结 前 ...
- keras中自定义Layer
最近在学习SSD的源码,其中有两个自定的层,特此学习一下并记录. import keras.backend as K from keras.engine.topology import InputSp ...
- I.MX6 support eMMC 5.0
/***************************************************************************** * I.MX6 support eMMC ...
- BZOJ - 2957 (分块/线段树)
题目链接 本质是维护斜率递增序列. 用分块的方法就是把序列分成sqrt(n)块,每个块分别用一个vector维护递增序列.查询的时候遍历所有的块,同时维护当前最大斜率,二分找到每个块中比当前最大斜率大 ...
- PS基础教程[1]如何制作微信泡泡
PS是很多朋友都很喜欢额一款图像处理软件,我们可以使用PS制作很多的效果,本系列经验教程的起源就来源于知道中这位朋友问的微信泡泡如何使用,下面就来简单的分享一下. 微信泡泡制作方法 有很多的方法可以制 ...
- ExpressionTree,Emit,反射
ExpressionTree,Emit,反射 https://www.cnblogs.com/7tiny/p/9861166.html [前言] 前几日心血来潮想研究着做一个Spring框架,自然地就 ...
- [ArgumentException: 可能证书“CN=JRNet01-PC”没有能够进行密钥交换的私钥,或者进程可能没有访问私钥的权限。有关详细信息,请参见内部异常。]
堆栈跟踪: [CryptographicException: 密钥集不存在. ] System.Security.Cryptography.Utils.CreateProvHandle(CspPara ...
- 十九、python沉淀之路--装饰器
一.实现装饰器的预备知识 装饰器 = 高阶函数 + 函数嵌套 + 闭包 1.高价函数定义: 1.函数接收的参数是一个函数名 2.函数的返回值是一个函数名 3.满足上述条件任意一个,都可称之 ...