【异常】SQL Server blocked access to STATEMENT OpenRowset/OpenDatasource

异常错误提示: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 
1. Microsoft SQL Server 2005中Surface Area Configuration设置方式为开始—所有程序—Microsoft SQL Server 2005—配置工具—Surface Area Configuration,即可启动Surface Area Configuration.
 
2. Microsoft SQL Server 2008中Surface Area Configuration配置有所不同.
1). 首先连接到数据库,然后右键服务器—方面(Facets),弹出查看方面(View Facets)对话框,如图:
2). 点击方面(Facets)右边的下拉列表,选择外围应用配置器(Surface Area Configuration),配置即可,如图:
 
然后更改AdHocRemoteQueriesEnabled为true即可,如图:
原文地址:https://www.cnblogs.com/lidonghao/p/3728552.html