Home » SQL & PL/SQL » SQL & PL/SQL » Synonyms
icon5.gif  Synonyms [message #247872] Wed, 27 June 2007 07:25 Go to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
Hi all,


I can create synonym as follow,
CREATE SYNONYM S_EMP FOR EMP;

Is there anyway that i can make that synonym Read Only while creating it.
so that no DML can be performed.
Re: Synonyms [message #247876 is a reply to message #247872] Wed, 27 June 2007 07:37 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
Do a search on GRANT
Re: Synonyms [message #247878 is a reply to message #247872] Wed, 27 June 2007 07:38 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no privilege on synonym.
Synonym is a virtual object just an alias.
Privilege are on the final object.

Regards
Michel
Re: Synonyms [message #248002 is a reply to message #247872] Wed, 27 June 2007 14:51 Go to previous messageGo to next message
Bill B
Messages: 1482
Registered: December 2004
Senior Member
You can't do that with a synonym, but you could with a view

CREATE OR REPLACE VIEW S_EMP AS
SELECT * FROM EMP
WITH READ ONLY;



Re: Synonyms [message #248003 is a reply to message #248002] Wed, 27 June 2007 14:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Good remark! ./fa/2115/0/

Regards
Michel
Re: Synonyms [message #248007 is a reply to message #248003] Wed, 27 June 2007 15:17 Go to previous message
Bill B
Messages: 1482
Registered: December 2004
Senior Member
Thanks Michel, I appreciate it.
Previous Topic: Index on a view
Next Topic: how to convert columns to rows in SQL * PLUS
Goto Forum:
  


Current Time: Fri Dec 02 14:20:52 CST 2016

Total time taken to generate the page: 0.08463 seconds