Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to find the name of the schema on an existing Oracle 7 Database?

Re: How to find the name of the schema on an existing Oracle 7 Database?

From: <attwoody_at_my-dejanews.com>
Date: 1998/10/07
Message-ID: <6vg94m$56c$1@nnrp1.dejanews.com>#1/1

In article <3618fd9a.139370888_at_news.earthlink.net>,   mleung_at_earthlink.net (m.L.) wrote:
> Hello everyone,
>
> In one of our client databases, I need to find out the name of
> the schema in a hurry. I looked around. Apparently, user_tables has
> no such information. Should I try svrmgr?
> any help will be very much appreciated.
>
> If you don't mind, please forwar the information to
> <mleung_at_intelus.com>. I will try to check this newsgroup later, but
> the sooner I get this information is better.
>
> Thanks in advance
>
> michael
>

Greetings, Michael

USER_TABLES only shows tables in the _logged-on_ user's schema. To see other tables, you must query DBA_TABLES (to query DBA_* tables, you must have either SELECT ANY TABLE, or DBA privilege).

You can do one of the following:

In Server Manager Line Mode (svrmgrl) (or SQL*Plus, actually):

select distinct owner from dba_tables;

This will tell you the owners of the various tables in your database. Any owner that is not 'SYS' or 'SYSTEM' is a schema owner.

Then:

select table_name from dba_tables where owner = 'name_of_owner_from_previous_inquiry'

If you have the Windows 95 or NT based tools - you can go into Schema Manager, in the Enterprise Manager group of tools, and the schemas will be displayed.

If you're using the GUI-based Server Manger, you can click on the folder displaying the various schemas.

I hope this is helpful

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Oct 07 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US