Friday 28 September 2012

Database Administration ( 28 Sep. 2012 )



Different commands relating tablespace were discussed and students do practice 




Create tablespace myspace datafile ‘path \myspace1.dbf ‘ size 10m;
            -this will create a tablespace having name myspace1 and its size will 10Mb
Alter tablespace myspace readonly;
            -this will change the attribute to readonly after this user can only read or view the file
Alter tablespace myspace read write;
            -this will undo the above command now user can read and write data
Desc dba_data_files
            -this will show all colum’s names stored in database
Alter database datafile ‘ path \myspace1.dbf ‘ resize 5m;
            -this will change the size of tablespace to 5Mb which was 10Mb
Alter tablespace myspace offline normal;
-          this will do offline the tablespace
drop tablespace myspace including contents and datafiles;
-          this will delete datafile and its contents having name myspace1
to delete any tablespace first change its status to offline than delete it
//fb like box