Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Posts
    24

    Unanswered: Two users for the same schema?

    Hello,

    Currently I have one common database which to be used by different applications. I decided to give each one a schema. For each schema there are different user accounts to be created. For this reason, I would like to know how to create a user account which uses the same schema as another user account. It is like to have a master account and some dependent accounts associated with.

    Please let me know how this is done in 9i?

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    As far as I can tell, no way. A schema = a single user + its objects. In order to make two (or more) users use the same schema objects, you'll have to create those users and grant required privileges on all (or some) objects to those users, such as

    GRANT SELECT ON original_user.table1 TO another_user;
    GRANT EXECUTE ON original_user.procedure TO another_user;
    etc.

  3. #3
    Join Date
    May 2006
    Posts
    24
    Is there a way to give permissions for any table on that schema?

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    The easiest way is to grant select, update, and delete on the master schema's tables and objects to a ROLE and then simply grant the role to each new user.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Also, how about 'alter session set current_schema = <master schema>' ?

Posting Permissions

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