exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
go
select * from JudgeProblem b inner join
opendatasource('SQLOLEDB','Data Source=.;user ID=sa;password=sa;').Hxkr_kc_null.dbo.Site a
on a.SiteID=b.CourseID
go
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure