s****e 发帖数: 54 | 1 Hi,
I have 2 server, one is local one is remote.
I have no problem to use sql management studio to set up the connection.
But what I want is to create a view, this view will get the information from
a table in the remote server.
I added the remote server link.
I can run :
use localserver
select * from sys.servers where name='remote server'
but when I try this:
select * from [remote server].[remote database].[dbo].[remote table]
where UniqueID='17'
uniqueID is the column name in the remote table
I got this error:
OLE DB provider "SQLNCLI10" for linked server "remoteserver" returned
message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "remoteserver" 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 1326, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [1326].
Any idea? |
m*****y 发帖数: 229 | 2 你要有linked server才行吧。[linked server].[remote database].[dbo].[remote
table] |
c*****d 发帖数: 6045 | 3 同意楼上说的,用这个sql确认添加了linked server
select * from sys.sysservers where isremote=0 |
s****e 发帖数: 54 | 4 I added the linked server.
the remote server is show under the SSMS, server object, linked server.
This is my first time try the linked server. I guess there is some setting
wrong.
I have no problem use object explorer to connect to the remote server.
Thanks! |
s****e 发帖数: 54 | 5 I added the linked server.
the remote server is show under the SSMS, server object, linked server.
This is my first time try the linked server. I guess there is some setting
wrong.
I have no problem use object explorer to connect to the remote server.
Thanks! |
c*****d 发帖数: 6045 | 6 在SSMS->server object->linked server
右键点击remote linked server->test connection
有错误信息吗 |
s****e 发帖数: 54 | 7 找到问题了
由于server name 比较复杂。所以我copy paste 的时候居然少copy 了一位
现在没问题了。
多谢各位! |
c*****d 发帖数: 6045 | 8 不发包子不能平民愤
【在 s****e 的大作中提到】 : 找到问题了 : 由于server name 比较复杂。所以我copy paste 的时候居然少copy 了一位 : 现在没问题了。 : 多谢各位!
|
e****7 发帖数: 4387 | |
s****e 发帖数: 54 | 10 baozi fa le
no money le... |