Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Finding information??
> I have been asked to find all thr schemas in and instance, and each table
> containted
> within. Our DBA left and I have been given the DBA responsibilities for the
> interm.
> Is there a table/view I can get all the schemas from? Also, is there a way
> to show the
> tables that have been created under each schema?? We are looking to find
> which table
> stores user account information.
Even as a junior developer you should know the answer to this question. That they would leave you as acting DBA should scare you if it didn't scare them.
There are in Oracle a series of views that contain every database object. They start with DBA_, ALL_, and USER_. Thus a select from DBA_TABLES will give you every table in the database as well as its owner, and information about the table. DBA_TAB_COLUMNS will give you information on the columns in the table. Go to DBA_INDEXES, DBA_CONSTRAINTS, DBA_OBJECTS, DBA_TRIGGERS, etc. etc. you get the idea.
The schemas can be obtained by:
SELECT DISTINCT OWNER
FROM dba_tables;
To find users, as opposed to owners:
SELECT name
FROM user$
WHERE type# = 1;
Daniel A. Morgan Received on Sun Mar 25 2001 - 21:59:15 CST
![]() |
![]() |