DETERMINE IF AD HOC QUERIES HAVE ALREADY BEEN ENABLED ON YOUR SERVE...
1. Determine if ad hoc queries have already been enabled on your
server. Run the following statements in a query window in SSMS.
A zero in the run_value column in the result set means ad hoc
queries are disabled, and a one means they are enabled.
EXEC sp_configure 'show advanced',1;
RECONFIGURE;
EXEC sp_configure 'Ad Hoc Distributed Queries';