If we grant privileges on a table to PUBLIC, all database users have access to the table. How does a public synonym differ from that? If we create a public synonym on that table, does that make the table available to all users too? What is the dierence between a direct grant to public and creating a public synonym? Thanks.
It is how the table is referenced by other users. You doing grant select on table_name as the owner of that table to public means others would have to do select * from owner.table_name. If you create the public synonym, then others only need to do select * from table_name as opposed to select * from owner.table_name.
[QUOTE]Originally posted by stecal It is how the table is referenced by other users. You doing grant select on table_name as the owner of that table to public means others would have to do select * from owner.table_name. If you create the public synonym, then others only need to do select * from table_name as opposed to select * from owner.table_name. [/QUOTE
That being the case, if I were to create a new table and then create public synonym on it, then anyone can access the table, right? What is the point of a public synonym then? Isn't just like granting to PUBLIC?
Originally posted by pcotten That being the case, if I were to create a new table and then create public synonym on it, then anyone can access the table, right?
Wrong, of course!
How about reading some concepts manuals to understand what is SYNONYM and what is PRVILEGE (GRANT)? They are two totaly different things, they have nothing in common whatsoever.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Originally posted by jmodic How about reading some concepts manuals to understand what is SYNONYM and what is PRVILEGE (GRANT)? They are two totaly different things, they have nothing in common whatsoever.
If we grant privileges on a table to PUBLIC, all database users have access to the table. How does a public synonym differ from that? If we create a public synonym on that table, does that make the table available to all users too? What is the dierence between a direct grant to public and creating a public synonym? Thanks.
--
Create Public Synonym doesnt necessarily grants access rights to the objects, it's just an alternate way of referring the object without mentioning the Schema owner's name.
Only if a table has been given grant it can be viewed/accessed.
To PUBLIC is giving grants to all users of this Database instead of giving grants to individual users.
Bookmarks