原文:
SQL Server blocked access to procedure 'sys.sp_OACreate' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', search for 'Ole Automation Procedures' in SQL Server Books Online.
翻译:
SQL Server阻止访问过程'系统创建因为此组件作为此服务器安全配置的一部分被关闭。系统管理员可以使用sp_configure启用“Ole自动化过程”的使用。有关启用“Ole自动化过程”的详细信息,请在SQL Server联机丛书中搜索“Ole自动化过程”。
exec sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
exec sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
执行代码
报错 :
The specified option 'Ole Automation Procedures' is not supported by this edition of SQL Server and cannot be changed using sp_configure.
翻译 :
此版本的SQL Server不支持指定的选项“Ole Automation Procedures”,无法使用sp_configure更改
sp_configure 'show advanced options', 1
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE;
GO
sp_configure 'show advanced options', 1
GO
RECONFIGURE;
我执行上面的语句是可以的,你试下
如果还不行,使用下面语句查看数据库版本信息,是不是express版本
select @@version
没有启用ole自动化
参考
https://blog.csdn.net/it_zen/article/details/1545725?source=1
另外,检查用户的权限。要有ALTER SETTINGS权限