Monday, December 8, 2014

ADD DATAFILE IN RAC WITH ASM



Step 1: Check Space in ASM DiaskGroups

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

NAME                              FREE_MB   TOTAL_MB PERCENTAGE
------------------------------ ---------- ---------- ----------
WEBLOGDB_DATA1                          2         185080 .001080614
WEBLOGDB_DATA2                      19065     185080 10.3009509
WEBLOGDB_DATA3                      27253     185080 14.7249838
REDO                                               87549      139232 62.8799414

SQL>
SQL>
SQL>
SQL>














Step 2:  Add Datafile with respective ASM diskgroups

SQL>
SQL> ALTER TABLESPACE USERS ADD DATAFILE '+WEBLOGDB_DATA3' SIZE 100M  AUTOEXTEND ON  MAXSIZE 10240M;

Tablespace altered.

SQL>

Step 3: Check and verify datafile

SQL> select a.FILE#,a.CREATION_TIME,b.TABLESPACE_NAME,b.FILE_NAME ,b.BYTES/1024/1024 from v$datafile a ,dba_data_files b where a.FILE#=b.FILE_ID and b.TABLESPACE_NAME='&TABLESPACE_NAME'  order by a.CREATION_TIME,b.FILE_ID





No comments:

Post a Comment