Sunday, 16 March 2014

What is a Tablespace in user perspective and DBA perspective?

What is a Tablespace ? What are its relative views?

In user perspective a tablespace  is nothing but collection of database objects like table,view,index etc.
In DBA perspective  a tablespace is  a logical structure formed by grouping physical files(datafiles).

so in order to view the objects in a tablespace we can use some of DBA_* views like

select OWNER,TABLE_NAME,TABLESPACE_NAME from dba_tables;
select OWNER,TABLE_NAME,TABLESPACE_NAME from all_tables;
select OWNER,TABLE_NAME,TABLESPACE_NAME from user_tables;
select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from dba_segments;
select OWNER,SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from user_segments;

in order to view the datafiles under each tablespace we use some of DBA_* views like

select FILE_NAME,FILE_ID,TABLESPACE_NAME from dba_data_files;

No comments:

ORA-600 [kwqitnmphe:ltbagi], [1], [0] reported in the alert log file.

ORA-00600 [kwqitnmphe:ltbagi] Cause: This issue arises in 12.1.0.2. The error occurs because there are still Historical Messages without...