Monday, August 5, 2013

Solving Exception: SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server.

If such error is thrown in SQL Server 2012 Management Studio, 
"Msg 15281, Level 16, State 1, Line 2
SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', search for 'Ad Hoc Distributed Queries' in SQL Server Books Online."


  1. Right Click on your Server 
  2. Select Facets
  3. Select "Surface Area Configuration" from the combo box 
  4. Change the "Ad Hoc Distributed Queries" to True.


No comments:

Post a Comment