zoukankan      html  css  js  c++  java
  • SQL Server 阻止了对组件 'Ole Automation Procedures' 的 过程 'sys.sp_OACreate' 的访问

    sqlserver2008导入excel到数据库的时候报错:

    SQL Server 阻止了对组件 'Ole Automation Procedures' 的 过程 'sys.sp_OACreate' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'Ole Automation Procedures'。有关启用 'Ole Automation Procedures' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。

    解决方法:sql执行下列语句

    -- 如果我们在执行以上sql的时候显示"配置选项 'Ole Automation Procedures' 不存在,
    --也可能是高级选项"错误,是因为系统隐藏掉了show advanced options的配置项,
    --我们可以先执行以下sql后再重新设置:
    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    -- OLE自动化功能:1为开启,0为关闭
    sp_configure 'Ole Automation Procedures', 1;
    GO
    RECONFIGURE;
    GO
    EXEC sp_configure 'Ole Automation Procedures';
    GO
  • 相关阅读:
    17. Letter Combinations of a Phone Number
    16. 3Sum Closest
    15. 3Sum
    14. Longest Common Prefix
    13. Roman to Integer
    12. Integer to Roman
    11. Container With Most Water
    10. Regular Expression Matching
    9. Palindrome Number
    8. String to Integer (atoi)
  • 原文地址:https://www.cnblogs.com/cczhoufeng/p/3304795.html
Copyright © 2011-2022 走看看