计算ASM diskgroup大小

We are adding datafile in SYSAUX tablespace.

First check in the diskgroup how much free space is available to add datafile.

You can see in this output we have 3 diskgroups with total size and free size.

SQL> SELECT name, free_mb, total_mb, free_mb/total_mb*100 as percentage FROM v$asm_diskgroup;

NAME            FREE_MB     TOTAL_MB      PERCENTAGE
---------- ------------ ------------ ------------------------------
DATA                 380,349      511,994              74.2877846
OCRVOTE         102,002      102,397             99.6142465
RECO                 495,530       511,997              96.7837702

Now find out that diskgroup name which is mapped to SYSAUX tablesapce for adding datafile.

SQL> select tablespace_name,file_name from dba_data_files where tablespace_name='SYSAUX';

TABLESPACE                                FILE_NAME
---------- --------------------------------------------------------------------------
SYSAUX     +DATA/ieclive/datafile/sysaux.264.860628911

DATA diskgroup is mapped to the sysaux tablespace now Add the datafile in DATA diskgroup.
SQL> alter tablespace SYSAUX add datafile'+DATA' size 5G autoextend on next 1024M;
     Database altered.
Now Check the datafile is added for Sysaux Tablespace with 5gb size. previous we have only one sysaux.
SQL> select tablespace_name,file_name,bytes/1024/1024/1024 from dba_data_files;

TABLESPACE             FILE_NAME                                     BYTES/1024/1024/1024
---------- --------------------------------------------- --------------------------------------------
SYSTEM              +DATA/ieclive/datafile/system.258.860628911                         5
SYSAUX              +DATA/ieclive/datafile/sysaux.264.860628911                          5
UNDOTBS1    +DATA/ieclive/datafile/undotbs1.262.860628913                          5
SYSAUX                +DATA/ieclive/datafile/sysaux.266.860728913                        5
UNDOTBS2 +DATA/ieclive/datafile/undotbs2.269.860629051                           5
USERS                +DATA/ieclive/datafile/users.256.860630027                           10
USERS               +DATA/ieclive/datafile/users.274.860630073                            10


7 rows selected

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值