Results 1 to 2 of 2

Thread: schema and user

  1. #1
    Join Date
    Aug 2003

    Question Unanswered: schema and user


    I am new to oracle. I have two question which should be simple to you guys:

    1. How to view a user's default schema ?
    2. How to grant a schema's all objects to another user ? e.g. I create a user named TestUser. And then I want TestUser can see any objects in HR schema.



  2. #2
    Join Date
    Nov 2002
    1 select default_tablespace from dba_users;

    2 spool the data to a file
    write generic sql
    exec the output

    set heading off;
    set feedback off;
    select 'grant select on ' || owner || '.' <table_name,view_name> || ' to <users, role > ;' from all_<tables,views>;
    spool off;

    besides the select you might grant other rights, too: grant select, insert , ... on
    grants may be needed for tables and/or views

    grants can be given to users or to roles

Posting Permissions

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