9esc v database.ie/s:<< . s*a. To reduce character of the file_name. 0+ho/ to drop a tablespaceD . 9esc dba_data_files.define_editor=vi. ! -it *ives u ne/ line to /rite. sysau=_occupants 9esc dba_tablespaces. file_name from dba_temp_files order by 1. define_editor=vi col file_name format a01 col name format a02 set sqlprompt 3_4S&"565_$!77&$T_89&7T8:8&">3 Tablespace Management Practical’s:-. -to *o to last line.Sql>select tablespace_name. v s*ainfo . v s*astat. 9esc v tablespace. C+ 'o/ to add datafile to e=istin* tablespacesD alter tablespace tname add datafile ?)path)@+dbfA siBe 122( autoe=tend on. file_name from dba_data_files union select tablespace_name. name permanently and sqlname: Sql>! cd !"#$%&_'!(&)sqlplus)admin) vi *lo*in+sql . :rom >i on/ards /e can maintain tablespaces locally+ 1+ To create locally mana*ed tablespace:<< create tablespace tname datafile ?)path)@+dbfA siBe 122( autoe=tend on. 9esc v datafile.

9rop tablespace tname includin* contents and datafiles. 11+ 'o/ to rename the datafile. E+ 'o/ to drop a datafileD alter tablespace tname drop datafile 5)data)oracle)dev)data)userdata1+dbf5. mv ?)path)oldnameA ?)path)ne/nameA 1C+Le must *ive information to controlfile+ #lter database rename file ?)path)dfname+dbfA to ?)path)dfname+dbfA. > 'o/ to resiBe a datafileD #lter database datafile ?)path)@+dbfA resiBe C22(. F+ 'o/ to see datafiles siBesD Select file_name. Select name. J+ 'o/ to see creation time of datafiles. 1+ 'o/ to rename a tablespaceD alter tablespace oldname rename to ne/name. 'o/ to drop tablespace /ithout datafilesD 9rop tablespace tablespacename. #lter tablespace tname offline. alter tablespace tname online. To see tablespaces name and datafiles pathD Select tablespace_name. creation_time from v datafile. 10+ 'o/ to create bi* file tablespaceD . file_name from dba_data_files. 12+ 'o/ to add one more orphan datafile to e=istin* tablespaceD #lter tablespace tname add datafile ?)path)@+dbfA reuse. K+ 'o/ to add orphan datafile to ne/ tablespaceD $reate tablespace tname datafile ?)path)@+dbfA reuse. bytes)12CE)12CE GsiBe in (HsI from dba_data_files.

1E+ 'o/ to create no lo* tablespaceD create tablespace nolo*tbs datafile 5)oradata1)sales)data)nolo*tbs2C+dbf5 siBe 12m nolo**in*. 1+1 'o/ to resiBe the temporary tempfileD Sql>alter database tempfile ?)path)temp+dbfA resiBe 122(. E+ ho/ to maOe temp *roup as defaultD #lter database default temporary tablespace temp*roup. 1+ ho/ to create temporary tablespaceD $reate temporary tablespace tempname tempfile ?path)temp+dbfA siBe 122( autoe=tend on.ie/s:<< 9esc dba_temp_files. default_tablespace from dba_users /here username = 5T&(N4S&"5. 1+ ho/ to drop a tablespace *roupD :irst /e need to drop members. select @ from dba_tablespace_*roups. creation_time from v tempfile. file_id. status from dba_temp_files. . 9esc v tempfile. Temporary tablespace practicals:-. Select file_name. temporary_tablespace. 9esc dba_tablespace_*roups. C+ ho/ to create tablespace *roupD select username. fileM.$reate bi*file tablespace bi*_ts datafile ?)path)bi*_ts+dbfA siBe 122( autoe=tend on. 0+ ho/ to add e=istin* temp file to *roupD #lter tablespace tempC tablespace *roup t*rp. Select name. $reate temporary tablespace temp1 tempfile ?)path)temp+dbfA siBe 122( tablespace *roup t*r*.

maOe it as default: alter database default temporary tablespace name no/ drop the temporary *roup members: drop tablespace tempname includin* contents and datafiles. create ne/ temporary tablespace: create temporary tablespace name tmepfile ?)path)temp+dbfA siBe 122( autoe=tend on. Le do have only one undo tablespace for one database+ Lhen /e need more siBe /e /ill create bi* one .alter tablespace temp tablespace *roup t*rp. Undo tablespace management:-Sho/ parameter undo. 9esc v undostat. 9esc v rollstat.