ASM

一.检查虚拟机的相关配置:
[root@rac1 ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0C:29:E3:7D:59 
          inet addr:10.1.1.210  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fee3:7d59/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7957 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1314 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:615293 (600.8 KiB)  TX bytes:103970 (101.5 KiB)
          Interrupt:10 Base address:0x1480

[root@rac1 ~]# ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=58.8 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 58.860/58.860/58.860/0.000 ms

[root@rac1 ~]# rpm -qa |grep oracleasm
oracleasmlib-2.0.3-1.el5
oracleasm-2.6.18-128.el5-2.0.5-1.el5
oracleasm-2.6.18-128.el5debug-2.0.5-1.el5
oracleasm-support-2.1.2-1.el5
oracleasm-2.6.18-128.el5PAE-2.0.5-1.el5
oracleasm-2.6.18-128.el5xen-2.0.5-1.el5

 

[root@rac1 ~]# fdisk -l

Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         765     6144831   83  Linux
/dev/sda2             766         956     1534207+  82  Linux swap / Solaris
/dev/sda3             957        1566     4899825   83  Linux

Disk /dev/sdb: 536 MB, 536870912 bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         512      524272   83  Linux

Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         391     3140676   83  Linux

Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         391     3140676   83  Linux

Disk /dev/sde: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         261     2096451   83  Linux


[root@rac1 ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda1             5.7G  3.0G  2.5G  55% /
/dev/sda3             4.6G  138M  4.2G   4% /u01
tmpfs                 349M     0  349M   0% /dev/shm
[root@rac1 ~]#

二.上传database安装介质

安装软件不建库
more ~/.bash_profile
PATH=$PATH:$HOME/bin

export PS1="`/bin/hostname -s`->"
export EDITOR=vim
export ORACLE_SID=up
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/b
in:/usr/X11R6/bin
umask 022


rac1->cd admin
rac1->mkdir +ASM
rac1->cd +ASM
rac1->mkdir {a,b,c,u}dump
rac1->ll
总计 16
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 adump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 bdump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 cdump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 udump
rac1->pwd
/u01/app/oracle/admin/+ASM

 

$ vi init+ASM.ora

*.asm_diskstring='ORCL:VOL*'
*.background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'
*.core_dump_dest='/u01/app/oracle/admin/+ASM/cdump'
*.user_dump_dest='/u01/app/oracle/admin/+ASM/udump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'


rac1->orapwd file=orapw+ASM  password=oracle

 

rac1->export ORACLE_SID=+ASM
rac1->sqlplus  / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 18:39:43 2010

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

Connected to an idle instance.

SQL> startup nomount
ORA-29701: unable to connect to Cluster Manager

[root@rac1 ~]# cd /u01/app/oracle/product/10.2.0/db_1/bin
[root@rac1 bin]# ./localconfig delete
/etc/oracle does not exist. Creating it now.
./localconfig: line 715: /etc/init.d/init.cssd: 没有那个文件或目录

[root@rac1 bin]# ./localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.

rac1->sqlplus  / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 18:43:52 2010

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

Connected to an idle instance.

SQL> startup nomount
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes

SQL> create spfile from pfile;

File created.

SQL> startup force
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ORA-15110: no diskgroups mounted

[root@rac1 soft]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]


[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "VOL1" as an ASM disk:                        [  OK  ]
[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
Marking disk "VOL2" as an ASM disk:                        [  OK  ]
[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL3 /dev/sde1
Marking disk "VOL3" as an ASM disk:                        [  OK  ]
[root@rac1 soft]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3

 

SQL> create diskgroup dg1  external redundancy disk 'ORCL:VOL1';

SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
DG1                            EXTERN MOUNTED


如果上述命令返回的 state是 DISMOUNTED,那么我们需要手工将挂载 diskgroup
SQL> ALTER DISKGROUP dgroup1 MOUNT;

Diskgroup altered.

SQL> show parameter asm_diskgroups
 
NAME                                 TYPE       VALUE
------------------------------------ ---------- ------------------------------
asm_diskgroups                       string     DGROUP1

三、创建ASM数据库

接下来,创建ASM数据库的工作就非常的简单了。执行dbca实用程序,在第六步“storage options”部分选择“Automatic Storage Management ”,在接下来的“ASM Disk Groups”步骤中,选择之前创建的“DGROUP1”,再按照普通建库的方式完成数据库的创建就OK了。

[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdb1
Marking disk "VOL4" as an ASM disk:                        [  OK  ]


SQL> alter diskgroup dg2 add disk 'ORCL:VOL4';

Diskgroup altered.

SQL>  select NAME,TOTAL_MB,STATE from v$asm_diskgroup;

NAME                             TOTAL_MB STATE
------------------------------ ---------- -----------
DG1                                  3067 MOUNTED
DG2                                  5625 MOUNTED


rac1->export ORACLE_SID=+ASM
rac1->sqlplus  / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 22:36:22 2010

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show parameter instance_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      +ASM
SQL> show parameter asm_diskg

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      DG1, DG2

SQL> show parameter ins

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
active_instance_count                integer
cluster_database_instances           integer  

SQL>  select NAME,STATE,TYPE,TOTAL_MB from v$asm_diskgroup;


NAME                           STATE       TYPE     TOTAL_MB
------------------------------ ----------- ------ ----------
DG1                            MOUNTED     EXTERN       3067
DG2                            MOUNTED     NORMAL       5625

SQL> SQL> alter diskgroup dg2 drop disk vol4;

Diskgroup altered.

SQL> select NAME,STATE,TYPE,TOTAL_MB from v$asm_diskgroup;

NAME                           STATE       TYPE     TOTAL_MB
------------------------------ ----------- ------ ----------
DG1                            MOUNTED     EXTERN       3067
DG2                            MOUNTED     NORMAL       5625

SQL>  select NAME,STATE,TYPE,TOTAL_MB from v$asm_diskgroup;

NAME                           STATE       TYPE     TOTAL_MB
------------------------------ ----------- ------ ----------
DG1                            MOUNTED     EXTERN       3067
DG2                            MOUNTED     NORMAL       5625

SQL> create diskgroup dg3 external redundancy 'ORCL:VOL4'

SQL> DROP DISKGROUP DG3 ;

  1
instance_groups                      string
instance_name                        string      +ASM
instance_number                      integer     0
instance_type                        string      asm
open_links_per_instance              integer     4
parallel_instance_group              string
parallel_server_instances            integer     1

 

rac1->export ORACLE_SID=up
rac1->sqlplus  / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 22:38:48 2010

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DG2/up/datafile/system.256.726865819
+DG2/up/datafile/undotbs1.258.726865825
+DG2/up/datafile/sysaux.257.726865821
+DG2/up/datafile/users.259.726865827
+DG2/up/datafile/tb1.268.726875891

 

SQL> create tablespace tb2  datafile '+dg2' size 30m ;

Tablespace created.

SQL>  select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DG2/up/datafile/system.256.726865819
+DG2/up/datafile/undotbs1.258.726865825
+DG2/up/datafile/sysaux.257.726865821
+DG2/up/datafile/users.259.726865827
+DG2/up/datafile/tb1.268.726875891
+DG2/up/datafile/tb2.269.726878421

6 rows selected.


SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
+DG2/up/onlinelog/group_3.263.726866059
+DG1/up/onlinelog/group_3.259.726866065
+DG2/up/onlinelog/group_2.262.726866045
+DG1/up/onlinelog/group_2.258.726866055
+DG2/up/onlinelog/group_1.261.726866037
+DG1/up/onlinelog/group_1.257.726866041
+DG1/up/onlinelog/group_4.260.726875773
+DG2/up/onlinelog/group_4.266.726875777
+DG1/up/onlinelog/group_5.261.726875799
+DG2/up/onlinelog/group_5.267.726875803


SQL>  alter database add logfile;

Database altered.

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
+DG2/up/onlinelog/group_3.263.726866059
+DG1/up/onlinelog/group_3.259.726866065
+DG2/up/onlinelog/group_2.262.726866045
+DG1/up/onlinelog/group_2.258.726866055
+DG2/up/onlinelog/group_1.261.726866037
+DG1/up/onlinelog/group_1.257.726866041
+DG1/up/onlinelog/group_4.260.726875773
+DG2/up/onlinelog/group_4.266.726875777
+DG1/up/onlinelog/group_5.261.726875799
+DG2/up/onlinelog/group_5.267.726875803
+DG1/up/onlinelog/group_6.262.726878635

MEMBER
--------------------------------------------------------------------------------
+DG2/up/onlinelog/group_6.270.726878639

12 rows selected.

SQL>  alter database add logfile;

Database altered.

ASM service stop, then database service must stop ;
when start asm service ,then database servicer have been stop
must to manual to start database ;


echo ORACLE_SID
+ASM
SQL> shutdown abort
ASM instance shutdown
SQL> ho lsnrctl stat

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-AUG-2010 22:47:20

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                12-AUG-2010 21:27:19
Uptime                    0 days 1 hr. 20 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.mycorpdomain.com)(PORT=1521)))
The listener supports no services
The command completed successfully

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
rac1->lsnrctl stat

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-AUG-2010 22:47:33

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                12-AUG-2010 21:27:19
Uptime                    0 days 1 hr. 20 min. 14 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.mycorpdomain.com)(PORT=1521)))
The listener supports no services
The command completed successfully
rac1->sqlplus  / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 22:47:38 2010

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

Connected to an idle instance.

SQL> startup
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> ho lsnrctl stat

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-AUG-2010 22:48:05

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                12-AUG-2010 21:27:19
Uptime                    0 days 1 hr. 20 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.mycorpdomain.com)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
rac1->export ORACLE_SID=up
rac1->sqlplus  / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 22:48:19 2010

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  188743680 bytes
Fixed Size                  1218436 bytes
Variable Size              67111036 bytes
Database Buffers          117440512 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> ho lsnrctl stat

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-AUG-2010 22:49:27

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                12-AUG-2010 21:27:19
Uptime                    0 days 1 hr. 22 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.mycorpdomain.com)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "up" has 1 instance(s).
  Instance "up", status READY, has 1 handler(s) for this service...
Service "upXDB" has 1 instance(s).
  Instance "up", status READY, has 1 handler(s) for this service...
Service "up_XPT" has 1 instance(s).
  Instance "up", status READY, has 1 handler(s) for this service...
The command completed successfully


<asmcmd>
rac1->export ORACLE_SID=+ASM
rac1->asmcmd
ASMCMD> ls
DG1/
DG2/
ASMCMD> cd DG1/
ASMCMD> ls
UP/
ASMCMD> cd UP/
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> cd CONTROLFILE/
ASMCMD> ls
Current.256.726866029
ASMCMD> pwd
+DG1/UP/CONTROLFILE
ASMCMD> du
Used_MB      Mirror_used_MB
      8                   8
ASMCMD> cd ..
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> help
        asmcmd [-p] [command]

        The environment variables ORACLE_HOME and ORACLE_SID determine the
        instance to which the program connects, and ASMCMD establishes a
        bequeath connection to it, in the same manner as a SQLPLUS / AS
        SYSDBA.  The user must be a member of the SYSDBA group.

        Specifying the -p option allows the current directory to be displayed
        in the command prompt, like so:

        ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >

        [command] specifies one of the following commands, along with its
        parameters.

        Type "help [command]" to get help on a specific ASMCMD command.

        commands:
        --------
        cd
        du
        find
        help
        ls
        lsct
        lsdg
        mkalias
        mkdir
        pwd
        rm
        rmalias
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> mkdir mydir
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
mydir/
ASMCMD> rm mydir
ASMCMD> cd ..
ASMCMD> ls
UP/
ASMCMD> cd up
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> cd onlinelog
ASMCMD> ls
group_1.257.726866041
group_2.258.726866055
group_3.259.726866065
group_4.260.726875773
group_5.261.726875799
group_6.262.726878635
group_7.263.726878669
ASMCMD> cd ..
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> cd ..
ASMCMD> ls
UP/
ASMCMD> cd ..

ASMCMD> ls
DG1/
DG2/
ASMCMD> cd dg2
ASMCMD> ls
UP/
ASMCMD> cd up
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfileup.ora
ASMCMD> cd DATAFILE/
ASMCMD> ls
SYSAUX.257.726865821
SYSTEM.256.726865819
TB1.268.726875891
TB2.269.726878421
UNDOTBS1.258.726865825
USERS.259.726865827

ASMCMD> pwd
+dg2/up/DATAFILE
ASMCMD> ls
SYSAUX.257.726865821
SYSTEM.256.726865819
TB1.268.726875891
TB2.269.726878421
UNDOTBS1.258.726865825
USERS.259.726865827

ASMCMD> ls
SYSAUX.257.726865821
SYSTEM.256.726865819
TB1.268.726875891
TB2.269.726878421
UNDOTBS1.258.726865825
USERS.259.726865827
ASMCMD> cd ..
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfileup.ora
ASMCMD> find +dg2 sys*
+dg2/UP/DATAFILE/SYSAUX.257.726865821
+dg2/UP/DATAFILE/SYSTEM.256.726865819


SQL>  select NAME,STATE,TYPE,TOTAL_MB from v$asm_diskgroup;


NAME                           STATE       TYPE     TOTAL_MB
------------------------------ ----------- ------ ----------
DG1                            MOUNTED     EXTERN       3067
DG2                            MOUNTED     NORMAL       5625

SQL> SQL> alter diskgroup dg2 drop disk vol4;

Diskgroup altered.

SQL> select NAME,STATE,TYPE,TOTAL_MB from v$asm_diskgroup;

NAME                           STATE       TYPE     TOTAL_MB
------------------------------ ----------- ------ ----------
DG1                            MOUNTED     EXTERN       3067
DG2                            MOUNTED     NORMAL       5625

SQL>  select NAME,STATE,TYPE,TOTAL_MB from v$asm_diskgroup;

NAME                           STATE       TYPE     TOTAL_MB
------------------------------ ----------- ------ ----------
DG1                            MOUNTED     EXTERN       3067
DG2                            MOUNTED     NORMAL       5625

SQL> create diskgroup dg3 external redundance 'ORCL:VOL4'

SQL> DROP DISKGROUP DG3 ;

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值