我有兩個數據庫服務器。一個在辦公室電腦上,另一個在網絡服務器上。互聯網上兩臺計算機之間有一個安全的加密隧道。 已經在web服務器pc上設置了一個SQL Server用戶,以允許訪問我需要的表。只能通過管理員查看鏈接服務器上的表。不如SQL服務器用戶
在辦公室pc上有一個需要訪問這些鏈接表的本地帳戶。
在計算機之間建立鏈接服務器。從SQL Server Management Studio中的系統管理員界面,我可以在鏈接服務器上免費瀏覽表格。
,但如果我的身份登錄SQL Server用戶,我嘗試測試連接
===================================
The test connection to the linked server failed.
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(String cmd)
at Microsoft.SqlServer.Management.Smo.LinkedServer.TestConnection()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LinkedServerConnectionTest.Invoke()
===================================
Access to the remote server is denied because no login-mapping exists. (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.5058&EvtSrc=MSSQLServer&EvtID=7416&LinkId=20476
------------------------------
Server Name: SERVER\INSTANCE
Error Number: 7416
Severity: 16
State: 2
Procedure: sp_testlinkedserver
Line Number: 1
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
有什麼我試過到目前爲止
- 添加本地和遠程用戶的詳細信息的鏈接服務器屬性窗口。
- 添加默認安全上下文
我該如何設定,讓SQL Server用戶可使用鏈接服務器「使用此安全上下文進行」?