Home » SQL & PL/SQL » SQL & PL/SQL » how create synonym for full database
how create synonym for full database [message #654272] Fri, 29 July 2016 02:58 Go to next message
mfahimaamirgmailcom
Messages: 50
Registered: May 2011
Location: pakistan
Member
hi to all masters
dear i have 100 of table , view and trigger in my database and 10 user
how i create one synonym for all user
it can be possible by one synonym all user user all database object
please help me
regard
Re: how create synonym for full database [message #654274 is a reply to message #654272] Fri, 29 July 2016 03:03 Go to previous messageGo to next message
John Watson
Messages: 8624
Registered: January 2010
Location: Global Village
Senior Member
Look up the CREATE PUBLIC SYNONYM statement.
Re: how create synonym for full database [message #654276 is a reply to message #654274] Fri, 29 July 2016 03:54 Go to previous messageGo to next message
mfahimaamirgmailcom
Messages: 50
Registered: May 2011
Location: pakistan
Member
thank you for your reply
please send me sample
regard
Re: how create synonym for full database [message #654277 is a reply to message #654276] Fri, 29 July 2016 03:57 Go to previous messageGo to next message
John Watson
Messages: 8624
Registered: January 2010
Location: Global Village
Senior Member
I notice that you have been given the same advice in reply to your post on OTN.
Look up the syntax, man. Then you might learn something.
Re: how create synonym for full database [message #654278 is a reply to message #654277] Fri, 29 July 2016 04:26 Go to previous messageGo to next message
mfahimaamirgmailcom
Messages: 50
Registered: May 2011
Location: pakistan
Member
dear please see

CREATE PUBLIC SYNONYM (this is schema name) abc FOR (this is user name) xyz;

dear by this code xyz user can access all object of abc user schema and can login forms and report 6i
please clear me
Re: how create synonym for full database [message #654279 is a reply to message #654278] Fri, 29 July 2016 04:32 Go to previous messageGo to next message
John Watson
Messages: 8624
Registered: January 2010
Location: Global Village
Senior Member
You have not looked up the syntax, have you? If you test your invented syntax, you will find a problem:
orclz>
orclz> create public synonym garbage for scott;

Synonym created.

orclz> select * from garbage.dept;
select * from garbage.dept
                      *
ERROR at line 1:
ORA-00942: table or view does not exist


orclz>
Re: how create synonym for full database [message #654282 is a reply to message #654279] Fri, 29 July 2016 05:25 Go to previous messageGo to next message
mfahimaamirgmailcom
Messages: 50
Registered: May 2011
Location: pakistan
Member
hi master
dear i use this code

CREATE PUBLIC SYNONYM firstsyn FOR firsttable;
in abc user because abc user have firstable

that code run fine without any error
i connect xyz in sql developer
i checked in sql developer by this query (with xyz user)

select * from firstsyn;

this query run and give me data without any error
but i connect oracle forms 6i and report by xyz user

that connect but not show the any table (firstsyn or firsttable)

please give me idea how i use this synonym or other user table in form and report
regard
Re: how create synonym for full database [message #654293 is a reply to message #654279] Fri, 29 July 2016 07:54 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
https://community.oracle.com/thread/3955384
Previous Topic: Database vs Tablespace
Next Topic: comparison ALL with subquery returns no rows - TRUE
Goto Forum:
  


Current Time: Mon Oct 25 20:50:55 CDT 2021