PDW文档指出:
SQL 语句必须使用链接服务器的 EXECUTE 语句提交。使用 EXECUTE 语句可避免对对象使用四部分名称,SQL Server PDW 不支持这种名称。例如:
使用这个:EXEC ('SELECT * FROM AdventureWorksPDW2012.dbo.dimCustomer') AT PDWLINK;
不要使用这个:SELECT * FROM PDWLINK.AdventureWorksPDW2012.dbo.dimCustomer
所以我不希望能够浏览链接服务器并获得数据库列表。您可以运行查询。
供其他人参考,PDW/APS 文档解释了如何创建连接到 PDW 的 SQL Server 链接服务器:
EXEC master.dbo.sp_MSset_oledb_prop N'SQLNCLI', N'AllowInProcess', 1
GO
EXEC master.dbo.sp_addlinkedserver
@server = N'PDWLINK', @srvproduct=N'PDW',
@provider=N'SQLNCLI', @provstr=N'Server=<ip_control_node_cluster>,17001', @catalog=N'<database>';
GO
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname=N'PDWLINK',@useself=N'False',
@rmtuser=N'<PDW_login_name>',@rmtpassword='<PDW_login_password>'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'rpc',
@optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'rpc out',
@optvalue=N'true'
GO
-- The options below are not required
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'collation compatible',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'data access',
@optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'dist',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'pub',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'sub',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'connect timeout',
@optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'collation name',
@optvalue=null
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'lazy schema validation',
@optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'query timeout',
@optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'use remote collation',
@optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption
@server=N'PDWLINK', @optname=N'remote proc transaction promotion',
@optvalue=N'false'
GO