22,210
社区成员
发帖
与我相关
我的任务
分享
用SA帐户登陆
运行
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
然后执行导入SQL语句,接着再通过以下语句配置阻止:
exec sp_configure 'Ad Hoc Distributed Queries', 0
reconfigure
exec sp_configure 'show advanced options', 0
reconfigure
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 0
GO
RECONFIGURE;
GO
--测试过,执行正常
INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0','C:\datas.mdb';'admin';'', Test)
SELECT '1', '2'
SELECT * FROM
OPENROWSET('Microsoft.Jet.OLEDB.4.0','C:\datas.mdb';'admin';'', Test)
/*
a b
1 2
*/