为什么我将表格链接到服务器后无法访问该表格?这有什么不对?谢谢!
EXEC sp_addlinkedserver
@server='172.xx.xxx.xx\ABC',
@srvproduct='',
@provider='SQLNCLI',
@datasrc='ABC_XYZ'
SELECT * FROM [172.xx.xxx.xx\ABC].[ABC_XYZ].DBO.TABLETOACCESS
我一直在:
OLE DB provider "SQLNCLI10" for linked server "172.xx.xxx.xx\ABC" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "1172.xx.xxx.xx\ABC" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 53, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [53].
答案 0 :(得分:1)
您需要将凭据传递给链接服务器。最快的方法是使用Wizzard。 SSMS - >链接服务器 - >右键单击 - >安全选项卡。
执行此操作后,您可以在标题栏附近script button
获取脚本。