[lnkForumImage]
TotalShareware - Download Free Software

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


 

C

3/28/2007 3:24:00 PM

I have Stored Procedure which copies some data from one Database to another.

This will be scheduled to run using the Agent in SQL Server 2005.

Both Databases are on separate servers and the server names may change.

Is there any way I can make these names configurable so that if the Database
Server name changes that my Stored Procedure will still work having changed
some key somewhere?

Should I use DTS / SIS instead?



1 Answer

Russell Fields

3/28/2007 4:03:00 PM

0

Since a stored procedure is doing this, I assume you must be using a linked
server. (And, yes, SSIS is a good tool for this sort of task.)

Is your linked server named after the physical server name of the other
server?

If so, consider redefining the linked server with a role name such as
TransferImportantTable. In the linked server definition, of course, the
Data Source would have the physical server name.

That way if a server changes names, you just get the linked server redefined
to point to the proper datasource and the code does not have to change.

RLF

"C" <C@discussions.microsoft.com> wrote in message
news:99464842-0C90-4991-910B-9E1382858664@microsoft.com...
>I have Stored Procedure which copies some data from one Database to
>another.
>
> This will be scheduled to run using the Agent in SQL Server 2005.
>
> Both Databases are on separate servers and the server names may change.
>
> Is there any way I can make these names configurable so that if the
> Database
> Server name changes that my Stored Procedure will still work having
> changed
> some key somewhere?
>
> Should I use DTS / SIS instead?
>
>
>