链接服务器相关
来源:互联网 发布:二手手机估值软件 编辑:程序博客网 时间:2024/06/01 08:33
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
连接excel2007
select * from
OpenDataSource('Microsoft.Ace.OLEDB.12.0','Data Source="e:/aa.xlsx";Extended properties="Excel 12.0;HDR=Yes"')...[Sheet1$]
97-2003版本
EXCEL
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=文件位置;Extended Properties=Excel 8.0;HDR=Yes
ACCESS
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=文件位置;Jet OLEDB:Database Password=密码;
2007版本
EXCEL
Provider=Microsoft.Ace.OleDb.12.0;Data Source=文件位置;Extended Properties=Excel 12.0;HDR=Yes
ACCESS
Provider=Microsoft.Ace.OleDb.12.0;Data Source=文件位置;Jet OLEDB:Database Password=密码;
【其他说明】
HDR=Yes/NO 表示是否将首行做标题。
不支持文件带密码的EXCEL文件,哪怕知道正确密码,除非自行先打开该文件
Msg 7399, Level 16, State 1, Line 2
The OLE DB provider "Microsoft.Ace.OLEDB.12.0" for linked server "(null)" reported an error. Access denied.
Solution 1
First you need to check whether you have installed the 2007 Office System Driver: Data Connectivity Components which is necessary for Microsoft OLEDB ACE 12.0 driver to work. So if you have not done that download it by clicking the link below.
2007 Office System Driver: Data Connectivity Components
Once you downloaded and installed it on your system restart your machine to see if the issue is resolved for you or not.
Solution 2
Check whether the user login that you are accessing has rights on SQL Server Service or not. If not you will have to give your credentials so that the SQL Service runs using your login credentials.
Steps
1. Close SQL Server Management Studio. Type Services.msc in the run command to open the services window
2. Search for SQL Server Service and right click it and select properties as shown below
3. In the Log On Tab, select This Account. Click on Browse and type your login name there and the click on Check Names
4. Once it finds your login name press OK.
5. Now type your login’s passwords in both the fields as shown below press apply and then ok
6. Restart the services so that the new changes are applied as shown in figure below.
7. Now start SQL Server Management Studio and try to run the query if still not working try a system restart
Solution 3
Run the following Query in your SQL Server Management Studio close it and start again
USE [master]
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
GO
- 链接服务器相关
- windows中链接远端服务器中的Oracle相关问题总结
- 相关链接:
- 相关链接
- 相关链接
- 相关链接
- 相关链接
- 相关链接
- 相关链接
- 链接服务器
- 链接服务器
- 服务器相关
- 服务器相关
- asterisk服务器连接(sip、iax2中继)的相关链接整理
- 安装OpenSSH Server,用XShell客户端链接服务器的相关配置
- 链接服务器 代码,跨服务器链接很重要
- 相关学习链接
- OPC的相关链接
- jsp request方法大全
- Fedora中的rpm软件包命令用法摘记
- CISC, RISC 区别
- ubuntu中pdf中文乱码解决方法
- MFC中的afx_msg和BEGIN_MESSAGE_MAP
- 链接服务器相关
- adb devices获得的设备标识
- 09036a33 JAVA EYE
- 基于CC2430/31的Zigbee实践(8)--Texas Instruments/ZStack-1.4.3/Documents/CC2430文档阅读记录
- 谁有C#。net工资管理系统
- 类
- wuliao
- 如何开展灰盒测试[1]:灰盒测试优缺点分析 收藏
- MySql Oracle SqlServer三大数据库的数据类型列表