Export (0) Print
Expand All
Expand Minimize

Ad Hoc Distributed Queries Option

Updated: 14 April 2006

By default, SQL Server does not allow ad hoc distributed queries using OPENROWSET and OPENDATASOURCE. When this option is set to 1, SQL Server allows ad hoc access. When this option is not set or is set to 0, SQL Server does not allow ad hoc access.

Ad hoc distributed queries use the OPENROWSET and OPENDATASOURCE functions to connect to remote data sources that use OLE DB. OPENROWSET and OPENDATASOURCE should be used only to reference OLE DB data sources that are accessed infrequently. For any data sources that will be accessed more than several times, define a linked server.

ms187569.security(en-US,SQL.90).gifSecurity Note:
Enabling the use of ad hoc names means that any authenticated login to SQL Server 2005 can access the provider. SQL Server administrators should enable this feature for providers that are safe to be accessed by any local login. For more information, see the DisallowAdhocAccess option in Accessing External Data.

Release History

12 December 2006

Changed content:
  • Changed values that can be set for this option to be consistent with default values.

14 April 2006

Changed content:
  • Clarified the values that can be set for this option, and what these values mean.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft