itsnothingg
itsnothingg

Reputation: 108

How to replace linked server calls in SQL Server?

I have two SQL Server database instances - let's call them server A and B.

Sadly, as the user traffic decreases, there is now no need for running two servers anymore. So I'm planning to merge databases on server B to A.

But here's the problem: there are thousands of stored procedures and triggers on server A that connects to server B through linked server and vice versa.

When merged, there is no need to use linked server so I'm going to have to replace all of them.

It might be possible to keep linked server and make it to point itself? But it seems like a bad practice.

How can I effectively replace all of them? Do I have to write thousands of ALTER SQL scripts?

Upvotes: 0

Views: 381

Answers (1)

Dayat San
Dayat San

Reputation: 53

you can configure the link server that is by filling the Data Source with the name of the sql server instance used.

Upvotes: 1

Related Questions