You are on page 1of 2

Tablespace ::

what is tablespace? what is datafile? mandatory tablespace, type of tablespace

An Oracle database is comprised of one or more logical storage units called tablespaces. The database's data is
collectively stored in the database's tablespaces. tablespaces and datafiles. Each tablespace in an Oracle database is
comprised of one or more operating system files called datafiles. ... databases and datafiles.

system,sysaux(from 10g),undo,temp tablespace are mandetory....


follow the doc ...............................

Q. How to create a Tablespace?

sql> create tablespace sales datafile '/u02/app/oracle/oradata/orcl/sales01.dbf' size 100M;

Q. How to resize tablespace?

sql> alter database datafile '/u02/app/oracle/oradata/orcl/sales01.dbf' resize 150M;

Q. How to resize tablespace ..... adding datafile?

alter tablespace sales add datafile '/u01/app/oracle/oradata/orcl/sales02.dbf' size 50M;

Q. Details of all tablespace

sql> select tablespace_name,sum(bytes/1024/1024),count(file_name) from dba_data_files group by tablespace_name;

Q. Details of a tablespace
sql> select tablespace_name,sum(bytes/1024/1024) from dba_data_files group by tablespace_name having
tablespace_name='SALES';

Q. tablespace offline/online/read only / read write..........

You might also like