[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Synonyms for Stored Procedures

davinder.kainth

3/16/2007 10:21:00 AM

Hi,

I am having a few problems with synonyms! I am using SQL Server 2005
and have a couple of databases setup. One of these databases accesses
a number of tables and views from the 2nd database. To gain access to
various tables in my 2nd database I using synonyms created in the 1st
database (this works without any problems).

But now I have just tried to create a synonym for a stored procedure
in 2nd database, I can create the synonym but everytime I try to use
it in a view I can't even see the synonym under the add table option!
I can see other synonyms there for tables and views but not for the
sotred procedure!

Anyone have any ideas on whats going on?



Thanx

2 Answers

Razvan Socol

3/16/2007 11:50:00 AM

0

I think this isn't a problem related to synonyms, it's a general
problem: you cannot call a stored procedure from a view (i.e. when you
use "Add table" in the Query Designer", you can only see tables, views
and table-valued functions, not stored procedures).

Razvan

davinder.kainth

3/16/2007 2:01:00 PM

0

On 16 Mar, 11:50, "Razvan Socol" <rso...@gmail.com> wrote:
> I think this isn't a problem related to synonyms, it's a general
> problem: you cannot call a stored procedure from a view (i.e. when you
> use "Add table" in the Query Designer", you can only see tables, views
> and table-valued functions, not stored procedures).
>
> Razvan


Cheers Razvan,

I have just been thinking about it and realised I'm am being silly!
You are very much right, the synonym works fine, I can call it from a
stored procedure using exec command but obviously can't be used in a
view.

Thanks for your help

Davinder