Why not enable 'OLE Automation Procedures'?

Posted on 2011-05-05
Last Modified: 2013-11-20
I've installed Crystal Reports XI and attempting to reach my SQL 2008 db on a Windows 2008 Server .  I am getting errors with 'Ole Automation Procedures' being turned off.  I think I understand how to run sp_configure to turn it on, but would like to know what ramifications there are to setting this to enabled or the advanced options that is required to 1.
Question by:Still Learning
    LVL 35

    Expert Comment

    by:David Todd

    Firstly I don't understand where the error is occurring. Is the error in Crystal reports and that environment, or in SQL? Are you trying to connect from crystal to sql, or from sql to crystal? If from sql to crystal then I can understand why you might need ole automation procedures.

    Otherwise, is the o9le automation needed on the server where Crystal is, or inside SQL?

    I was told that some ole automation procs have memory leaks in them, but I never saw that myself.

    You are testing this on a test system, and not deploying against production, right?

    LVL 12

    Accepted Solution

    MS SQL Server allows an SQL script to create and manipulate external OLE Automation objects via the special stored procedures sp_OACreate, sp_OAMethod, and sp_OAProperty.  See

    Before you can invoke OLE Automation objects you must enable access (

    sp_configure 'show advanced options',1
    sp_configure 'Ole Automation Procedures', 1
    sp_configure 'show advanced options', 0

    Open in new window

    The above script temporarily turns on Show Advanced Options, enables OLE Automation, and turns it back off.  

    Warning: By default access to the OLE Automation stored procedures is disabled.  If enabled it allows any SQL script to invoke any OLE Automation object on the computer (such as the Windows Shell).  It is a significant security risk and should not be done lightly.  For example you need to be extra careful to protect against SQL-injection attacks.   It is basically the same as allowing xp_cmdshell.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now