Data Warehousing Community Forum
February 08, 2012, 10:37:00 am

Pages: [1]   Go Down
  Print  
Author Topic: Schema Name  (Read 864 times)
unknown
DW Apprentice
**

Reputation: +8/-0
Offline Offline

Posts: 44



View Profile
« on: January 19, 2008, 11:28:39 pm »

How to find a Schema name/type of schema thru database...!

Please explain  Sad
Logged

Thanks
Unknown Smiley
Sipra
Founder
*****

Reputation: +59/-0
Offline Offline

Posts: 323


Am the King...


View Profile WWW
« Reply #1 on: March 21, 2008, 02:39:18 pm »

If you want to find schema name for a particular object (table/index/view/procedure etc), then use the following (owner column is the schema name) -

select * from user_objects where object_name = '<objectname>';
or
select * from all_objects where object_name = '<objectname>';
or
select * from dba_objects where object_name = '<objexctname>';

where
- objectname is the table name or index name or procedure name.
- user_objects is used when finding objects in your own schema.
- all_objects is used when finding objects in all schemas for which you have been granted access
- dba_objects is used when finding objects in all schemas in the database

If you want all the schema names in the database and if you have DBA access then use -
select * from dba_users;

Hope this helps. Grin
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: