1.1 connection
select * from openrowset( 'SQLOLEDB ', 'sql server name '; 'username '; 'password ',database name.dbo.table name)
1.2 error prompt
Message 15281, level 16, status 1, line 3
sql server has blocked access to the state “openrowset/opendatasource” of the component “ad hoc distributed queries” because the component has been shut down as part of the security configuration of this server. System administrators can use sp_ Configure enables “ad hoc distributed queries”. For more information about enabling ad hoc distributed queries, search for ad hoc distributed queries in SQL Server Books Online
2. Solutions
2.1. Open the ad hoc distributed queries component and execute the following statements in the SQL query editor:
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
2.2. Close the ad hoc distributed queries component and execute the following statements in the SQL query editor:
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
Similar Posts:
- The ‘INFORMATION_SCHEMA.GLOBAL_STATUS’ feature is disabled; see the documentation for …
- Remote connection to Ubuntu 14.04 desktop environment through VNC under Windows
- ERROR 2006 (HY000): MySQL server has gone away No
- How to Solve vuetify dialog box cannot be edited (The embedded tinymic component)
- [Solved] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=20131)
- [Solved] Greenplum Use the Storage Error: function cannot execute on a QE slice because it accesses relation
- Namenode Initialize Error: java.lang.IllegalArgumentException: URI has an authority component
- [Solved] Vue3 vetur error: has no default export component is not exported
- Simple Steps to use LogMiner for finding high redo log generation
- AOP Configuration Services error: javax.persistence.TransactionRequiredException: no transaction is in progress