We are trying to move away from some old habits of using the SA account for absolutely everything in SQL.
In doing so we had to change some linked server security context from SA to another SQL Server authenticated account with elevated privileges until we sort out what permissions are needed.
After doing so I now get an error when executing a stored procedure remotely:
Msg 18456, Level 14, State 1, Line 1
Login failed for user 'sa'.
I looked at select * from sys.sysservers and the linked server in question has isremote = 1
I created another linked server but used the fully qualified domain name so I can have two linked servers to the same server.
The new linked server has isremote = 0
When I run the same stored procedure referencing the new linked server it works.
I don't want to delete the old linked server because I have no clue what is using it.
My stored procedure is really basic, it only selects 1. Why would it be trying to login as SA on one and not the other when it no longer references it?
This server does have SQL Server Replication enabled and is version 2008 R2.