Synonym problem

Shankar Mridha

Synonym problem
Hi All,
I am having a rather very basic question.. But somehow I am stuck up...
When I create a synonym for a view having just the qualifier as different.
Can I use the synonym in SPUFI??? I am getting -204 for it. But the same
object I can access thru file aid as well as I can use it in the program.
E.g there is a view XYZ with qualifier ABC ----> ABC.XYZ
I created a synonym as DEF.XYZ and used this in the SPUFI and its giving me
-204.
Can any one give some hilite on this.
Thanks

Shankar Mridha
Senior Consultant-Somerfield Project
Zensar Technologies Limited
Mile Post # 4, Pune-Nagar Road
Pune - 411014
Ph: +91-20-6633711-2 Ext 2139 (Off)
Ph: +91-20-6632019 (Res)
Mobile: +91-98220-66428



Rick Creech

Re: Synonym problem
(in response to Shankar Mridha)
Hi,
Did you try in spufi: (for dynamic sql the synonym owner is picked up from
the current sqlid.)

SET CURRENT SQLID = 'DEF';
SELECT * FROM XYZ;

hth,

Rick Creech


>From: Shankar Mridha <[login to unmask email]>
>Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
>To: [login to unmask email]
>Subject: Synonym problem
>Date: Fri, 28 Dec 2001 17:04:39 +0530
>
>Hi All,
>I am having a rather very basic question.. But somehow I am stuck up...
>When I create a synonym for a view having just the qualifier as different.
>Can I use the synonym in SPUFI??? I am getting -204 for it. But the same
>object I can access thru file aid as well as I can use it in the program.
>E.g there is a view XYZ with qualifier ABC ----> ABC.XYZ
>I created a synonym as DEF.XYZ and used this in the SPUFI and its giving me
>-204.
>Can any one give some hilite on this.
>Thanks
>
>Shankar Mridha
>Senior Consultant-Somerfield Project
>Zensar Technologies Limited
>Mile Post # 4, Pune-Nagar Road
>Pune - 411014
>Ph: +91-20-6633711-2 Ext 2139 (Off)
>Ph: +91-20-6632019 (Res)
>Mobile: +91-98220-66428
>
>
>
>
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com



Shankar Mridha

Re: Synonym problem
(in response to Rick Creech)
Yeah Rick,
I tried in SPUFI
SELECT * FROM DEF.XYZ;
Since this DEF is not my id I cant set the SQLID to that id .. as I dont
have the authority .. to do that ..

Shankar Mridha
Senior Consultant-Somerfield Project
Zensar Technologies Limited
Mile Post # 4, Pune-Nagar Road
Pune - 411014
Ph: +91-20-6633711-2 Ext 2139 (Off)
Ph: +91-20-6632019 (Res)
Mobile: +91-98220-66428


-----Original Message-----
From: rick creech [mailto:[login to unmask email]
Sent: Friday, December 28, 2001 6:21 PM
To: [login to unmask email]
Subject: Re: Synonym problem


Hi,
Did you try in spufi: (for dynamic sql the synonym owner is picked up from
the current sqlid.)

SET CURRENT SQLID = 'DEF';
SELECT * FROM XYZ;

hth,

Rick Creech


>From: Shankar Mridha <[login to unmask email]>
>Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
>To: [login to unmask email]
>Subject: Synonym problem
>Date: Fri, 28 Dec 2001 17:04:39 +0530
>
>Hi All,
>I am having a rather very basic question.. But somehow I am stuck up...
>When I create a synonym for a view having just the qualifier as different.
>Can I use the synonym in SPUFI??? I am getting -204 for it. But the same
>object I can access thru file aid as well as I can use it in the program.
>E.g there is a view XYZ with qualifier ABC ----> ABC.XYZ
>I created a synonym as DEF.XYZ and used this in the SPUFI and its giving me
>-204.
>Can any one give some hilite on this.
>Thanks
>
>Shankar Mridha
>Senior Consultant-Somerfield Project
>Zensar Technologies Limited
>Mile Post # 4, Pune-Nagar Road
>Pune - 411014
>Ph: +91-20-6633711-2 Ext 2139 (Off)
>Ph: +91-20-6632019 (Res)
>Mobile: +91-98220-66428
>
>
>
>
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com








Sanjeev (CTS) S

Re: Synonym problem
(in response to Shankar Mridha)
You need to set the secondary auth id to use this synonym if DEF is not your
user id. How synonym is created if you were not authorized to use DEF?
During creation either DEF was logged on with or SET CURRENT SQLID='DEF'
must be used.

Synonym need not be tried with 2 part names. Only one part name can be
specified and one part will be taken either from primary or secondary auth
id depending on if SET CURRENT SQLID is done or not.

Hope this makes some sense.

With Best Regards,
Sanjeev

> -----Original Message-----
> From: Shankar Mridha [SMTP:[login to unmask email]
> Sent: Friday, December 28, 2001 7:02 PM
> To: [login to unmask email]
> Subject: Re: Synonym problem
> Importance: High
>
> Yeah Rick,
> I tried in SPUFI
> SELECT * FROM DEF.XYZ;
> Since this DEF is not my id I cant set the SQLID to that id .. as I dont
> have the authority .. to do that ..
>
> Shankar Mridha
> Senior Consultant-Somerfield Project
> Zensar Technologies Limited
> Mile Post # 4, Pune-Nagar Road
> Pune - 411014
> Ph: +91-20-6633711-2 Ext 2139 (Off)
> Ph: +91-20-6632019 (Res)
> Mobile: +91-98220-66428
>
>
> -----Original Message-----
> From: rick creech [mailto:[login to unmask email]
> Sent: Friday, December 28, 2001 6:21 PM
> To: [login to unmask email]
> Subject: Re: Synonym problem
>
>
> Hi,
> Did you try in spufi: (for dynamic sql the synonym owner is picked up from
> the current sqlid.)
>
> SET CURRENT SQLID = 'DEF';
> SELECT * FROM XYZ;
>
> hth,
>
> Rick Creech
>
>
> >From: Shankar Mridha <[login to unmask email]>
> >Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
> >To: [login to unmask email]
> >Subject: Synonym problem
> >Date: Fri, 28 Dec 2001 17:04:39 +0530
> >
> >Hi All,
> >I am having a rather very basic question.. But somehow I am stuck up...
> >When I create a synonym for a view having just the qualifier as
> different.
> >Can I use the synonym in SPUFI??? I am getting -204 for it. But the same
> >object I can access thru file aid as well as I can use it in the program.
> >E.g there is a view XYZ with qualifier ABC ----> ABC.XYZ
> >I created a synonym as DEF.XYZ and used this in the SPUFI and its giving
> me
> >-204.
> >Can any one give some hilite on this.
> >Thanks
> >
> >Shankar Mridha
> >Senior Consultant-Somerfield Project
> >Zensar Technologies Limited
> >Mile Post # 4, Pune-Nagar Road
> >Pune - 411014
> >Ph: +91-20-6633711-2 Ext 2139 (Off)
> >Ph: +91-20-6632019 (Res)
> >Mobile: +91-98220-66428
> >
> >
> >
> >the DB2-L webpage at http://www.ryci.com/db2-l. The owners of the list
> can
> >
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>
> the
>
>
>
>
>
>
>



Rajendra Deshpande

Re: Synonym problem
(in response to Sanjeev (CTS) S)
Hi Shankar,

The reason you face no problem when you use the synonym in the prog may be
because the owner of the plan/package which contains the synonym usage is
'DEF'. Unless you can set the current sqlid to 'DEF' you may not be able to
use it in QMF,SPUFI.

-rajendra.


>From: Shankar Mridha <[login to unmask email]>
>Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
>To: [login to unmask email]
>Subject: Re: Synonym problem
>Date: Fri, 28 Dec 2001 19:01:52 +0530
>
>Yeah Rick,
>I tried in SPUFI
>SELECT * FROM DEF.XYZ;
>Since this DEF is not my id I cant set the SQLID to that id .. as I dont
>have the authority .. to do that ..
>
>Shankar Mridha
>Senior Consultant-Somerfield Project
>Zensar Technologies Limited
>Mile Post # 4, Pune-Nagar Road
>Pune - 411014
>Ph: +91-20-6633711-2 Ext 2139 (Off)
>Ph: +91-20-6632019 (Res)
>Mobile: +91-98220-66428
>
>
>-----Original Message-----
>From: rick creech [mailto:[login to unmask email]
>Sent: Friday, December 28, 2001 6:21 PM
>To: [login to unmask email]
>Subject: Re: Synonym problem
>
>
>Hi,
>Did you try in spufi: (for dynamic sql the synonym owner is picked up from
>the current sqlid.)
>
>SET CURRENT SQLID = 'DEF';
>SELECT * FROM XYZ;
>
>hth,
>
>Rick Creech
>
>
> >From: Shankar Mridha <[login to unmask email]>
> >Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
> >To: [login to unmask email]
> >Subject: Synonym problem
> >Date: Fri, 28 Dec 2001 17:04:39 +0530
> >
> >Hi All,
> >I am having a rather very basic question.. But somehow I am stuck up...
> >When I create a synonym for a view having just the qualifier as
>different.
> >Can I use the synonym in SPUFI??? I am getting -204 for it. But the same
> >object I can access thru file aid as well as I can use it in the program.
> >E.g there is a view XYZ with qualifier ABC ----> ABC.XYZ
> >I created a synonym as DEF.XYZ and used this in the SPUFI and its giving
>me
> >-204.
> >Can any one give some hilite on this.
> >Thanks
> >
> >Shankar Mridha
> >Senior Consultant-Somerfield Project
> >Zensar Technologies Limited
> >Mile Post # 4, Pune-Nagar Road
> >Pune - 411014
> >Ph: +91-20-6633711-2 Ext 2139 (Off)
> >Ph: +91-20-6632019 (Res)
> >Mobile: +91-98220-66428
> >
> >
> >
> >the DB2-L webpage at http://www.ryci.com/db2-l. The owners of the list
>can
> >
>
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>
>the
>
>
>
>
>
>
>




thanks,
Rajendra.


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com