oracle rac 删除数据库
方法一、DBCA删除库
1、oracle用户执行dbca
-----dbca删除库完成-----
方法二、DROP DATABASE
官方文档描述:
Dropping a database involves removing its datafiles, redo log files, control files, and initialization parameter files. The DROP DATABASE statement deletes all control files and all other database files listed in the control file. It then shuts down the database instance.
To use the DROP DATABASE statement successfully, all of the following conditions must apply:
1.The database must be mounted and closed.
2.The database must be mounted exclusively–not in shared mode.
3.The database must be mounted as RESTRICTED.
An example of this statement is:DROP DATABASE;
The DROP DATABASE statement has no effect on archived log files, nor does it have any effect on copies or backups of the database. It is best to use RMAN to delete such files. If the database is on raw disks, the actual raw disk special files are not deleted.If you used the Database Configuration Assistant to create your database, you can use that tool to delete (drop) your database and remove the files.
步骤:
1、将数据库实例关闭
[oracle@primarydb1 trace]$ srvctl stop database -d testdb
2、启动到nomount状态(在其中一个节点执行即可)
SYS@testdb1> startup nomount
ORACLE instance started.
Total System Global Area 2455228416 bytes
Fixed Size 2255712 bytes
Variable Size 687867040 bytes
Database Buffers 1744830464 bytes
Redo Buffers 20275200 bytes
–设置集群模式为false
SYS@testdb1> alter system set cluster_database=false scope=spfile;
System altered.
–关库
SYS@testdb1> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
3、mount restrict状态
SYS@testdb1> startup mount restrict
ORACLE instance started.
Total System Global Area 2455228416 bytes
Fixed Size 2255712 bytes
Variable Size 620758176 bytes
Database Buffers 1811939328 bytes
Redo Buffers 20275200 bytes
Database mounted.
–删除库
SYS@testdb1> drop database;
Database dropped.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
-----drop database 完成-----
- Oracle rac(基于asm的) 删除数据库和实例
- SQL Serverl删除数据库中所有表与数据语句
- 用游标删除符合条件的表 可以清空该数据库下所有表
- ORCALE数据库删除用户 ORA-01940: 无法删除当前已连接的用户
- Mysql 删除数据库drop database详细介绍
- 删除数据库关键数据文件后实例是否会崩溃
- Mysql 删除数据库drop database详细介绍
- MySQL常用语句(除增删改查基本操作外)替换字段部分内容,新增字段,修改字段,删除字段,查看数据库进程,杀死进程,自定义排序规则,字符串连接,日期自定义。
- 源码-Oracle数据库管理-第十章-数据表操作-Part 4(删除数据)
- SQL SERVER 数据日志太大,磁盘没有空间,直接删除数据库日志后,显示 恢复挂起。
- 数据库自动备份和自动删除以前的备份
- Oracle创建删除用户、角色、表空间、导入导出数据库命令行方式总结
- 删除tempdb数据库报错
- Yii 1.0数据库操作 查询、增加、更新、删除
- datagridview的使用,即时新增,更新,删除数据库数据
- Jdbc--实现对数据库的查询,更改,删除,添加等方法
- visual studio 项目中使用EF创建的数据库,后续更新数据库操作(生产已经部署,不能删除数据库重新创建)
- 无法删除数据库,因为该数据库当前正在使用
- 数据库增加列或删除列操作
- SQL Server删除distribution数据库