本篇内容主要讲解“Oracle ASM磁盘组的卸载与删除的方法是什么”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Oracle ASM磁盘组的卸载与删除的方法是什么”吧!创建磁盘组:
使用Oracle用户连接
[oracle
@rac1 ~]$ sqlplus / as sysdba
SQL>create diskgroup arch external redundancy disk ‘/dev/asm-disk5’ ;
[grid
@rac1 ~]$ sqlplus / as sysasm
SQL> create diskgroup arch external red免费主机域名undancy disk ‘/dev/asm-disk5’ ;
Diskgroup created.
SQL> select name,state from v$asm_diskgroup;
NAME STATE
DATA MO免费主机域名UNTED
OCR MOUNTED
ARCH MOUNTED卸载磁盘组:
SQL> alter diskgroup arch dismount;
Diskgroup altered.尝试卸载DATA:
SQL> alter diskgroup data dismount;
alter diskgroup data dismount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15027: active use of diskgroup “DATA” precludes its dismount尝试卸载OCR:
SQL> alter diskgroup ocr dismount;
alter diskgroup ocr dismount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15027: active use of diskgroup “OCR” precludes its dismount关闭数据库实例,尝试卸载DATA。(在两节点都关闭的情况下,才可以卸载)
[grid
@rac1 ~]$ srvctl stop database -d racdb;
ora.racdb.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance ShutdownSQL> alter diskgroup data dismount;
Diskgroup altered.删除磁盘组:查看当前磁盘组状态:
SQL> select name,state from v$asm_diskgroup;NAME STATEDATA MOUNTED
OCR MOUNTED
ARCH DISMOUNTED删除ARCH:
SQL> drop diskgroup arch;
drop diskgroup arch
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup “ARCH” does not exist or is not mounted将ARCH挂载上再次drop
SQL> alter diskgroup arch mount;
Diskgroup altered.SQL> drop diskgroup arch;
Diskgroup dropped.难道dismount的磁盘组必须被mount挂载上才可以被drop删除?
尝试一下图形化方式drop未挂载的磁盘组:
当前磁盘组信息:
删除DATA:
SQL> drop diskgroup DATA;
drop diskgroup DATA
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup “DATA” contains existing files删除OCR:
SQL> drop diskgroup OCR;
drop diskgroup OCR
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15276: ASM diskgroup OCR has cluster voting files结论:
1.挂载与使用的意义是不同的
2.当磁盘组被数据库使用时,是无法卸载和删除的,会出现下图错误:
3.ASM实例如果宕掉,那么使用ASM的数据库实例也会宕掉。疑问:到此,相信大家对“Oracle ASM磁盘组的卸载与删除的方法是什么”有了更深的了解,不妨来实际操作一番吧!这里是云技术网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
这篇文章主要介绍rhel7中pgloader怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! 官网下载 pgloader-3.4.1-2.rhel7.x86_64.rpm,python-psycopg2 安装这是sh免费主机域名el…