Saturday, September 24, 2016

scripts to add database and resize database and autoextend on in ASM




alter tablespace USERS add datafile '+DATA' size 3G ;


alter tablespace DATA  add datafile '+DATA' size 30G autoextend on  maxsize 50G;



ALTER DATABASE DATAFILE '+DATA/pr599/datafile/jet_data_03.366.862104147' resize 50G;



ALTER DATABASE DATAFILE '+DATA/pr599/datafile/jet_data_03.366.862104147' AUTOEXTEND ON maxsize 50G;



alter tablespace MGMT_TABLESPACE add datafile '+DATA' size 5G;

alter database datafile  '+DATA/pr746/datafile/users.257.861050819' autoextend on  maxsize 5G;


Above scripts is for ASM,

We can use the same for NON-ASM also, but while adding database we need to mention full datafile path and name



alter tablespace MGMT_TABLESPACE add datafile '/u01/test/test1.dbf' size 5G;


















No comments:

Post a Comment