免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 945 | 回复: 0
打印 上一主题 下一主题

针对一道最近很火的面试题如何不使用DBCA在Oracle 11中删除数据库 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-06-02 14:04 |只看该作者 |倒序浏览

1- 导入数据库的SID,如果没有定义的话
export ORACLE_SID=database
2- 以操作系统认证连接数据库
[oracle@Oracle11 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production onMon Dec 1 17:38:02 2014Copyright (c) 1982, 2009, Oracle. All rightsreserved.Connected to an idle instance.
3- 启动数据库实例
SQL> startup ORACLE
instancestarted.Total System Global Area3340451840 bytesFixed Size 2217952 bytesVariable Size 1828718624 bytesDatabaseBuffers 1493172224 bytesRedo Buffers 16343040 bytesDatabasemounted.Databaseopened.
4- 关闭数据库
SQL> shutdown immediate;
Database closed.Databasedismounted.ORACLEinstance shut down.
5- 启动独占模式
SQL> startup mount exclusive restrict
ORACLE instance started. Total SystemGlobal Area 3340451840 bytesFixed Size 2217952 bytesVariable Size 1828718624bytesDatabase Buffers 1493172224 bytesRedo Buffers 16343040 bytesDatabasemounted.
6- 删除数据库
SQL> drop database;
<br>Database dropped. Disconnectedfrom Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bitProductionWith the Partitioning, OLAP, Data Mining and Real Application Testingoptions
ok数据库被删掉了

具体请看武汉银河爱飞官方论坛,更多惊喜等着你!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP