调用格式为:
EXEC OPENDATASOURCE (
'SQLOLEDB',
'Data Source=10.161.34.xx;User ID=sa;Password=aaa'
).dbname.dbo.spname
需要注意的是,SQL Server 2005中调用另外实例中的存储过程时需要到 'Configuration Tools'>>'SQL Server Surface Area Configuration'>>'Surface Area Configuration for Features' >> 选择'Enable OPENROWSET and OPENDATASOURCE support'
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16754036/viewspace-608367/ ,如需转载,请注明出处,否则将追究法律责任。