Results 1 to 5 of 5

Thread: List all schemas

  1. #1
    Join Date
    Sep 2002
    Posts
    5,938

    List all schemas

    Hi, is there a better way to list all schemas in the server with sql statemet? I used following:

    select distinct owner from dba_objects

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    That may be the only way. You can't go to dba_users as some users may not have any objects created in their schema.

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    That's right. But I thought Oracle should come with better way for this.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,557
    Does ownership of one object make a user less of a schema owner than one who owns a thousand? You own an object, you are a schema owner. select distinct owner from dba_objects. Cut and dry.

    A schema is a collection of database objects. A schema is owned by a database user and has the same name as that user. Schema objects are logical structures created by users. Objects such as tables or indexes hold data, or can consist of a definition only, such as a view or synonym.

  5. #5
    Join Date
    Sep 2002
    Posts
    5,938
    Oracle can list all schemas in enterprise manager console, why can't do something in system catalog to make it easier to query? Just curious.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •