What Is Tablespace
What Is Tablespace
dbf' size 10
m;
Tablespace created.
SQL> select file_name,tablespace_name from dba_data_files;
FILE_NAME
-------------------------------------------------------------------------------TABLESPACE_NAME
-----------------------------/tererpdwt/clone/oradata/statspack01.dbf
STATSPACK
/tererpdwt/clone/oradata/users01.dbf
USERS
/tererpdwt/clone/oradata/undotbs01.dbf
UNDOTBS1
FILE_NAME
-------------------------------------------------------------------------------TABLESPACE_NAME
-----------------------------/tererpdwt/clone/oradata/sysaux01.dbf
SYSAUX
/tererpdwt/clone/oradata/system01.dbf
SYSTEM
/tererpdwt/clone/oradata/nag01.dbf
NAG
6 rows selected.
how to add datafile to particular tablespace------------SQL> alter tablespace nag add datafile '/tererpdwt/clone/oradata/nag02.dbf' size
10m;
Tablespace altered.
SQL> select tablespace_name,file_name from dba_data_files where tablespace_name=
'NAG';
TABLESPACE_NAME
-----------------------------FILE_NAME
-------------------------------------------------------------------------------NAG
/tererpdwt/clone/oradata/nag01.dbf
NAG
/tererpdwt/clone/oradata/nag02.dbf
FIND DEFAULT TEMORARY TABLESPACE AND DEFULATPERMANENT TABLESPACE---------SQL> select property_value from database_properties where propeRTY_name='DEFAUL
T_TEMP_TABLESPACE';
PROPERTY_VALUE
-------------------------------------------------------------------------------TEMP
SQL> select property_value from database_properties where propeRTY_name='DEFAUL
T_PERMANENT_TABLESPACE';
PROPERTY_VALUE
-------------------------------------------------------------------------------USERS
RENAME TABLESPACE NAME----------SQL> ALTER TABLESPACE NAG RENAME TO ARJUN;
Tablespace altered.
DROP TABLESPACE=====================