exec sp_configure 'show advanced options', 1 reconfigure GO exec sp_configure 'Ad Hoc Distributed Queries', 1 reconfigure