Tuxiom Board
September 09, 2010, 00:31:30 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hello! This is Tuxiom.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Oracle list all schema and tablespaces  (Read 382 times)
Nitin
Administrator
Newbie
*****
Posts: 29



« on: November 05, 2009, 10:43:20 »

List all users/schema
         SET PAGESIZE 50
         SELECT DISTINCT USERNAME FROM DBA_USERS;
 
List ONLY your tables
         SET PAGESIZE 80
         COL TABLE__NAME FORMAT a30;
         COL TABLE_TYPE FORMAT a30;
         SELECT * FROM CAT;

List the Oracle Tablespaces and free space
         SELECT * from v$TABLESPACE;

List the free space for all Oracle Tablespaces within a Database
         SELECT * from DBD_FREE_SPACE where TABLESPACE_NAME = 'IATOR';

List the space ALREADY USED for a specific Oracle Tablespace
         SELECT * from DBA_SEGMENTS where TABLESPACE_NAME = 'myTABLESPACE';

List extents for segments
         SELECT TABLESPACE_NAME, count(*), max(blocks), sum(blocks) from dba_free_space group by TABLESPACE_name;

See all the tables you have access to:
         SET PAGESIZE 90
         COLUMN "OBJECT NAME" format a26
         COLUMN "OBJECT TYPE" format a20
         SELECT object_name    "OBJECT NAME",
                object_type    "OBJECT TYPE"
         FROM
                user_objects
         WHERE
                object_type = 'TABLE';

See your TABLESPACE
         SELECT TABLESPACE_NAME from ALL_TABLES where TABLE_NAME = '<your_table>'
« Last Edit: November 05, 2009, 10:47:35 by Nitin » Logged

Linux, lets go there now..
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!