1
我创建了一台链接服务器到我的机器,以使用此脚本从其他服务器进行查询。链接服务器连接错误
EXEC sp_addlinkedserver
@server = N'serverdatabase\vtidbserver',
@provider = N'SQLOLEDB',
@datasrc = N'VTI_FIS',
@srvproduct=''
EXEC sp_addlinkedsrvlogin
@rmtsrvname=N'serverdatabase\vtidbserver',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'vtidbadmin',
@rmtpassword='[email protected]'
现在脚本成功执行,但,当它试图查询,这是我得到的错误信息:
OLE DB provider "SQLNCLI10" for linked server "serverdatabase\vtidbserver" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "serverdatabase\vtidbserver" 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].
但使用Management Studio时,我可以连接到服务器成功。 需要帮助这个问题,TIA