I need to create a Linked Server from Server A that uses a SQL Server Authentication to a Server B that uses a Windows Authentication.
Is the "impersonation" possible?
If "YES" what options, config should I pick?
-
After some Google it looks like this is not possible (itectec.com/database/…).msuzuki– msuzuki2022年01月08日 00:44:02 +00:00Commented Jan 8, 2022 at 0:44
-
Which security context do you want the connection under? Will the user authenticate or the server authenticate? It's very unclear what you are trying to achieve?Charlieface– Charlieface2022年01月09日 00:19:55 +00:00Commented Jan 9, 2022 at 0:19
-
@Charlieface the Linked Server has to go from Server A that has a user registered using SQL Authentication to a user in Server B that uses Windows Authentication. I am trying to impersonate the user that uses Windows Authentication.msuzuki– msuzuki2022年01月10日 12:24:41 +00:00Commented Jan 10, 2022 at 12:24
-
No this cannot be done. You can only use Windows Auth if the login exists on both servers and you are connecting to Server A using that loginCharlieface– Charlieface2022年01月10日 14:12:13 +00:00Commented Jan 10, 2022 at 14:12
-
thx @Charlieface you confirmed my suspicion. Do you want to make that as an answer so I can vote?msuzuki– msuzuki2022年01月10日 15:25:39 +00:00Commented Jan 10, 2022 at 15:25
1 Answer 1
As documented, this is not possible.
If you do not want to do impersonation (using the locally logged-in user on Server A to authenticate to Server B), you must specify a SQL Server Authentication login, you cannot authenticate using Windows Authentication.
Remote User
Use the remote user to map user defined in Local login. The Remote User must be a SQL Server Authentication login on the remote server.
[ @rmtuser = ] 'rmtuser'
Is the remote login used to connect tormtsrvname
when@useself
isFALSE
. When the remote server is an instance of SQL Server that does not use Windows Authentication,rmtuser
is a SQL Server login.