synonym returns no rows [message #173041] |
Fri, 19 May 2006 02:13 |
dbasif
Messages: 35 Registered: March 2006 Location: Bangalore, India
|
Member |
|
|
Hi ,
i have created two private synonym called usr1.s1 & usr1.s2 for
two tables ie usr2.t1 and usr2.t2 and granted all priviledge on this table to users usr1 and urs2, but one synonym like s2 returns zero records, please help me out , is there any priviledge to be assigned.
Regards
Mohammad Asif
|
|
|
|
Re: synonym returns no rows [message #173146 is a reply to message #173041] |
Fri, 19 May 2006 11:31 |
rkl1
Messages: 97 Registered: June 2005
|
Member |
|
|
As you mentioned the tables t1 and t2 are under usr2 schema and since privileges have been granted, then connecting as usr1:
sql> select 'x' from usr2.t1 where rownum <=1;
would show you one x. Now if that works out then we may go with synonym:
sql>create synonym s1 for usr2.t1;
now you may run the query:
sql>select * from s1;
Which will be resolved by Oracle as select * from usr2.t1;
thanks.
|
|
|
|
|
|
Re: synonym returns no rows [message #173328 is a reply to message #173231] |
Sun, 21 May 2006 22:51 |
dbasif
Messages: 35 Registered: March 2006 Location: Bangalore, India
|
Member |
|
|
Sorry i mean usr1.t2 returns no rows but usr2.t2 has data,
but when i create other table like
create table usr2.tmp as select * from usr2.t2, and want to access from us1 schema, like usr1.tmp records are coming.
i am really shocked .....
Regards
Asif
|
|
|