How to automatically change linked server password

ora 21 Reputation points
2024-06-18T10:07:07.8066667+00:00

How to automatically change linked server password

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,277 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 50,916 Reputation points
    2024-06-18T15:19:30.25+00:00

    This blog article talks about the T-SQL you need to run from PS to change a linked server password. Just call it from PS.

    Note that changing a linked server's password will break existing linked server connections. So either do this outside the hours you're using the linked server or ensure the server's password is changed in both places really close together and not when the connection may be in use.

    0 comments No comments

  2. Olaf Helper 42,926 Reputation points
    2024-06-19T06:01:28.5866667+00:00

    You didn't explain the logic for "new password for which login"?

    If you want to use PowerShell, use the PowerShell CmdLet "DbaTools"

    https://docs.dbatools.io/Get-DbaLinkedServer.html

    0 comments No comments