SQL Server saved remote password on linked server randomly becomes invalid

bukkybu 386 Reputation points
2025-07-09T13:38:31.0166667+00:00

I have a 2019 SQL Server with a single instance on it. It has a linked server that tests out and works fine. However, the stored remote password randomly (daily to every few days) becomes invalid, and I have to reenter the password to get it to work again. The instance and server are up without interruption. I have dozens of 2019 SQL Servers (all on 15.0.4430.1), many with a single instance and many with multiple instances. This is the only server\instance that is having this linked server password issue.

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 122K Reputation points MVP Volunteer Moderator
    2025-07-09T21:57:09.96+00:00

    Your screen is inconsistent. Below you have checked "Be made using the login's current security context", yet you have a password above. You don't have a password with self-mapping, since users log in with their own credentials.

    Anyway, the next time this happens, run this query, once you have changed the password:

    SELECT ll.* 
    FROM   sys.linked_logins ll
    JOIN   sys.servers s ON ll.server_id = s.server_id
    WHERE  s.name = '<RemoteServer>'
    

    Save a screenshot of the result set somewhere.

    Next time when the linked server stops working, run the same query again before correcting the password. I would expect the column modify_date to have changed. That is, something or someone have changed the login.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.