-
Public vs. Public Synonym
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.
-
And more ever never grant priviliges to PUBLIC. If necessary give grants to individual users.
Amar
"There is a difference between knowing the path and walking the path."
-
[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?
-
Creating a public synonym does not grant any privileges to the table you will still need to grant those addtionally.
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
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.
Ok here is the link pcotten
http://download-west.oracle.com/docs...m.htm#CNCPT711
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Public vs. Public Synonym
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.
Hope it's clear!
--Thiagu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|