We are calling stored procedures over a linkedserver from a client and we
want to use these client stored procedures in a test and production system
with different server names.
Also we don' t want to have to kinds of sps (for the test and production
system). Our Clients have a MSDE 7.0 and the Server is a MSSQL 2000.
For us it is not possible to use dynamik sql and substitute the linked
servername.
Does any body have an solution to this problem? We think that it may
possible to configure a linkedserver to access two different servernames?If you need to access different servers for the linked
server in the environments, why not just changed the linked
server in each environment? In test, linked server named
YourLinkedServer references the test box. In production,
change the linked server YourLinkedServer to reference the
production environment. You use the same code, same linked
server name but the linked server in the different
environments points to different servers.
-Sue
On Thu, 2 Jun 2005 06:06:04 -0700, "Pille"
<Pille@.discussions.microsoft.com> wrote:
>We are calling stored procedures over a linkedserver from a client and we
>want to use these client stored procedures in a test and production system
>with different server names.
>Also we don' t want to have to kinds of sps (for the test and production
>system). Our Clients have a MSDE 7.0 and the Server is a MSSQL 2000.
>For us it is not possible to use dynamik sql and substitute the linked
>servername.
>Does any body have an solution to this problem? We think that it may
>possible to configure a linkedserver to access two different servernames?
>|||Hi Sue. Is it so easy? We call our SPs from the client like "exec
MyLinkedServer.MyDB.MyUser.MySP". I think you said that is possible to acces
s
to different servers without changing the linked servername "MyLinkedServer"
.
How can I do this? I thought that there is a 1:1 relationship on the linked
servername and the real servername.
We add the linked server on the client like this:
exec master.dbo.sp_addlinkedserver 'MyLinkedServer', N'SQL Server'
exec master.dbo.sp_addlinkedsrvlogin 'MyLinkedServer'
How can I configure the realservername of the linked server
Thx... Pille...
"Sue Hoegemeier" wrote:
> If you need to access different servers for the linked
> server in the environments, why not just changed the linked
> server in each environment? In test, linked server named
> YourLinkedServer references the test box. In production,
> change the linked server YourLinkedServer to reference the
> production environment. You use the same code, same linked
> server name but the linked server in the different
> environments points to different servers.
> -Sue
> On Thu, 2 Jun 2005 06:06:04 -0700, "Pille"
> <Pille@.discussions.microsoft.com> wrote:
>
>|||Use sp_setnetnamesql
Wednesday, March 28, 2012
Linkedservername variable
Labels:
calling,
client,
database,
linkedserver,
linkedservername,
microsoft,
mysql,
oracle,
procedures,
production,
server,
sql,
stored,
variable,
wewant
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment