代码
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
SELECT * into #tempxx FROM openrowset('SQLOLEDB','服务器';'登录用户';'密码','SELECT * FROM athletic.dbo.imatposcheckOnlineHD');
GO
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
SELECT * into #tempxx FROM openrowset('SQLOLEDB','服务器';'登录用户';'密码','SELECT * FROM athletic.dbo.imatposcheckOnlineHD');
GO
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure