1. enable ad hoc distributed queries
Enable the ad hoc distributed queries service before using OpenRowSet/OpenDataSource. Because this service is insecure, sqlserver is disabled by default.
How to enable ad hoc distributed queries
SQL Server
Use OpenDataSource and OpenRowset for Distributed Query and Data Import and Export
PS: This article is transferred from others' Materials
OpenDataSource:
I. Data Import and Export of SQL Server and acess
1. query access data in SQL Server:-- =====
Insert into [Table name] (field column)
Select field Column
From OpenDataSource ('Microsoft. Jet. oledb.4.0 ', 'Data source = "C: \ test. mdb"')... [Table name]
The usage of OpenDataSource () is as follows:Provides special connection information
Http://lihb810.blog.163.com/blog/static/59451162200862685726759/
Local Distributed Query:
1. Use a name composed of four parts. Server Name: Database Name: Username: Object Name (table, view)
2. Use the OpenDataSource () function
OpenDataSource
Cause: "SQL Server blocked access to component ' Ad Hoc distributed Queries ' STATEMENT ' Openrowset/opendatasource" when replicating data from a remote server to local Because this component has been shut down as part of this server's security
SQL Server Access database across servers (openrowset/opendatasource/openquery)1. Enable AD Hoc distributed QueriesBefore using Openrowset/opendatasource to enable the ad Hoc distributed queries service, because this service is not secure, SQL
OpenDataSource:
Provide special connection information without using the name of the linked server and use it as part of the four-part object name. Syntax
OpenDataSource (provider_name, init_string)
Parameters
Other OpenRowSet/OpenDataSource skills
Author: superhei _ [at] _ ph4nt0m.orgBlog:Http://superhei.blogbus.com/Team:Http://www.ph4nt0m.orgData: 2006-04-16
Preface:You should be familiar with the OpenRowSet/OpenDataSource application. CADT [1] is the
Delphi ADOCross-database access statements are as followsSelect * from OpenDataSource('SQLOLEDB','Data Source=server; User Id=sa; Password=123'). erp_logon.dbo.yq_userswhereUserno= 'Admin' andPwd= '040' andDb= 'Book set 1'Error content: SQL
Whether in sqlcmd or in C # logic, or directly in SQL Server, a personal summary can be which comes for either of these ways: 1,ssis;2,oledb Drive engine. SSIS really works, and now it's not going to be discussed here. Most of them use the second
Whether using sqlcmd or using C # logic processing or directly performing operations in SQL Server, the following two methods can be summarized: 1, SSIS; 2, OLEDB driver engine. SSIS is actually easy to use. I will not discuss it here. Most people
Today unit an ASP. NET site, there is a function is to export data, found an export error, error content is: SQL Server blocked the component ' Ad Hoc distributed Queries ' STATEMENT ' openrowset/ OpenDataSource ' access because this component has
Error: SQL Server blocked access to STATEMENT ' openrowset/opendatasource ' of component ' Ad Hoc distributed Queries ' because this component has been shut down as part of this server's security configuration Closed. System administrators can
Today wrote an Excel table import feature, results in Excel table content import to page times wrong: SQL Server blocked the STATEMENT ' openrowset/for component ' Ad Hoc distributed Queries ' OpenDataSource ' access because this component has been
An ASP. NET data import and export as required, the results reported the following error:SQL Server blocked access to the STATEMENT ' openrowset/opendatasource ' of component ' Ad Hoc distributed Queries ' because this component was shut down as
The error content is:SQL Server blocked access to the STATEMENT ' openrowset/opendatasource ' of component ' Ad Hoc distributed Queries ' because this component was shut down as part of this server's security configuration. System administrators can
Today, the unit of an ASP, there is a function is exported data, found an export error, error content is: SQL Server blocked the component'Ad Hoc Distributed Queries'The STATEMENT'Openrowset/opendatasource'Access, because this component has been
Cause: Occurs when replicating data from a remote server to localSQL Server blocked access to STATEMENT ' openrowset/opendatasource ' of component ' Ad Hoc distributed Queries ' because this component was shut down as part of this server's security
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.