34,593
社区成员
发帖
与我相关
我的任务
分享
SELECT ID,错误原因,错误备注,采集员编号,[省份/直辖市],城市,[区/县],所属行业,服务项目,名称,分店名,[别名/简称],联系电话,详细地址,信息类别 into [gyy]
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="E:\导入出数据\1210日导出信息\新原始公益信息.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...[Sheet1$]
消息 15281,级别 16,状态 1,第 1 行
SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'Ad Hoc Distributed Queries'。有关启用 'Ad Hoc Distributed Queries' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。
--Enable distributed query/transaction in AD HOC query like opendatasource/operquery
sp_configure 'Ad Hoc Distributed Queries',1
reconfigure with override
Go
--开启xp_cmdshell
--SQL Server blocked access to procedure 'xp_cmdshell'
sp_configure 'show advanced options', 1
go
reconfigure
go
sp_configure 'xp_cmdshell', 1
go
reconfigure
go
--开启sp_OACreate
--SQL Server blocked access to procedure 'sys.sp_OACreate'
sp_configure 'show advanced options', 1;
go
reconfigure;
go
sp_configure 'ole automation procedures', 1;
go
reconfigure;
go
sp_configure 'Ad Hoc Distributed Queries',1;
go
reconfigure
go