powered by simpleCommunicator - 2.0.59     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / LinkedServers
4 сообщений из 4, страница 1 из 1
LinkedServers
    #32012821
Alex
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
1. Есть несколько серверов в разных подсетях,
доступ к ним возможен только IP-адресу (по имени не доберешся - маршрутизаторы и роутеры не пропускают). Когда подключаю
EXEC sp_addlinkedserver '192.168.14.199',N'SQL Server'
EXEC sp_addlinkedserver '192.168.13.19',N'SQL Server'
То они появляються (по имени не берет)
Но потом возникла проблемка, как сделать
select * from 192.168.14.199.master.dbo.Kadr
это работать не будет!!!

Делаю так
EXEC sp_addlinkedserver @server = 'Server', @srvproduct='',@provider = 'MSDASQL',
@provstr = 'DRIVER={SQL Server};SERVER=192.168.14.199;UID=sa;PWD=;'
select * from Server.master.dbo.Kadr
Работает,
(в ВОL было без @srvproduct='',ругается null ..., поставил @srvproduct='' - успокоилось)
Но можна же как-то обойти это что-то вроде
select ss='select * from ?(192.168.14.199)?.master.dbo.Kadr'
exec (@ss)
Кроме того в BOL прочитал, подключаем сервер по имени 'London Sales'
а как делать select с 'London Sales'?
2. И второй вопрос какая разница между linkserver и remoteserver (немного ниже от linkserver в ЕМ)?
Заранее благодарен всем
Alex
...
Рейтинг: 0 / 0
LinkedServers
    #32012822
Glory
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
select ss='select * from [192.168.14.199] .master.dbo.Kadr'
...
Рейтинг: 0 / 0
LinkedServers
    #32012823
Glory
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
"A remote server configuration allows a client connected to one instance of Microsoft® SQL Server™ to execute a stored procedure on another instance of SQL Server without establishing another connection . The server to which the client is connected accepts the client request and sends the request to the remote server on behalf of the client. The remote server processes the request and returns any results to the original server, which in turn passes those results to the client."

"Microsoft® SQL Server™ allows you to create links to OLE DB data sources called linked servers. After linking to an OLE DB data source, you can:

-Reference rowsets from the OLE DB data sources as tables in Transact-SQL statements.
-Pass commands to the OLE DB data sources and include the resulting rowsets as tables in Transact-SQL statements.


Each distributed query can reference multiple linked servers and can perform either update or read operations against each individual linked server. A single distributed query can perform read operations against some linked servers and update operations against other linked servers. In general, Microsoft SQL Server requires distributed transactions support from the corresponding OLE DB provider whenever data from more than one linked server are likely to be updated in a transaction. Hence, the types of queries that are supported against linked servers depend on the level of support for transactions present in the OLE DB providers
"
...
Рейтинг: 0 / 0
LinkedServers
    #32012832
Alex
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Спасибо Glory.
...
Рейтинг: 0 / 0
4 сообщений из 4, страница 1 из 1
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / LinkedServers
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]