DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: public synonym doesn't work

  1. #1
    Join Date
    May 2001
    Posts
    285

    Angry public synonym doesn't work

    Ok, here is what I got:

    UserA.Table1
    UserB.Table1

    And I created public synonym for UserA.Table1.

    Now when I login as scott/tiger (or any other user w/o dba privilege), if I do

    desc table1 -- I think it should work 'cause the public synonym

    I got error

    ORA-04043: object "UserA"."Table1" does not exist

    If I login as UserA, I have no problem to desc the table.

    And FYI -- The public synonym Table1 does exist in all_synonym view, owner is public, and table owner is UserA.

    So what is missing here?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    a synonym is an alias, regardless of if it is public or not.

    You user must still have permission on the base object. If the user can desc usera.table1, then they should be able to reference the pubic synonym as well.
    Jeff Hunter

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    you need to grant select to b for that table

  4. #4
    Join Date
    May 2001
    Posts
    285
    Many thanks! The grant statements to select from the base table are in my script, but for some reason, it was not executed. Now I need to look at why that was left out...

    Thanks!

  5. #5
    Join Date
    Dec 2003
    Location
    pune,india
    Posts
    7
    hi
    as per my concern public synonym means that synonym can be accessed by anybody ie that synonym only ,synonym itself is a separate object.
    so other user can access that synonym but not the object referred by that synonym.for accessing that object through public synonym u have to grant privileges on that object explicitly.no grants are reqd on that synonym explicitly.beacuse that is a public synonym.

    try to analyze this
    n santoh

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334

    Question

    why repeat what two other have just said?

Posting Permissions

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


Click Here to Expand Forum to Full Width