I am trying to Link a server using an NT authentication as the impersonated connection, but this connection will be static to a specific user instead of passing the currently logged-in user's credentials. Is there any way to do this without setting up a new SQL-server account on the server I am linking to and using that for an unlisted user.
1 Answer 1
If it was possible to connect to a SQL Server without setting up a security context on that server, that would be a serious security hole. So, there must be a security context.
If you can ride on some existing rights that are already defined, then fine, but likely any existing security context was not tailored for your need. And since you want a specific account it is further complicated.
Perhaps you could have a SQL Agent job created on the RemoteServer
that would periodically PUSH the data to a staging table on your LocalServer
. (This would also allow the RemoteServer
administrators to control what happens, just in case that is an issue.)
Then you would grant rights on your LocalServer
to allow the RemoteServer
's job to insert data into the staging table on your LocalServer
.
Note: When SQL Agent runs a job using a credential it is not impersonating the account, but should be viewed as logging in using the credential's account name and password.
Explore related questions
See similar questions with these tags.
EXECUTE AS LOGIN='the_person_allowed_to_connect_to_remote_server';
, and then see if you can do what you need over that linked server. But now I am thinking that impersonation only works on the local machine, unless you have control of the AD server and can enable that one account for "delegation". But otherwise I do not think you can impersonate a Windows Login. Although SQL Agent can viaCredentials
;-)