How to enable OPENROWSET and OPENDATASOURCE support in SQL Server 2008

How to enable OPENROWSET and OPENDATASOURCE support in SQL Server 2008


exec sp_configure 'show advanced options', 1

RECONFIGURE;

exec sp_configure 'Ad Hoc Distributed Queries', 1

RECONFIGURE;

Output:

Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Configuration option 'Ad Hoc Distributed Queries' changed from 1 to 1. Run the RECONFIGURE statement to install.