调用格式为:
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'