question

NirveshKumar-3606 avatar image
0 Votes"
NirveshKumar-3606 asked Cathyji-msft commented

Migrate Linked server from one server to another server with same password

Is there a way to migrate the linked server from one server to another including the same password?

I don't have an old password.





Thanks!
Nirvesh

sql-server-generalsql-server-transact-sql
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NirveshKumar-3606,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it is not, please let us know. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·

1 Answer

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft edited

Hi @NirveshKumar-3606,

You can using Copy-DbaLinkedServer. Copy-DbaLinkedServer migrates Linked Servers from one SQL Server to another. Linked Server logins and passwords are migrated as well.

Refer to the blog Scripting Out Linked Servers with Actual Passwords.


We can also script out Linked Server on old server, then run the scripts in new server. But you need to manually key-in the passwords as when you script out linked servers, passwords are not scripted out - they are grabbled - ########. If the local login is not in your new server, you also need to add the login in your new server manually.

113949-screenshot-2021-07-13-102853.jpg

114043-screenshot-2021-07-13-102911.jpg


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.