Link to home
Create AccountLog in
Avatar of LenTompkins
LenTompkinsFlag for United States of America

asked on

Excel Connection Manager failed with error code 0xC0202009

What driver will I need to add to our server to get an SSIS job that creates Excel files to run?  I have the job set to "Use 32 bit runtime" enabled but I keep getting Excel Connection Manager failed with error code 0xC0202009.  When I read other posts they say I need to download Excel jet drivers.  I have found the 2007 Office System Driver: Data Connectivity component, but when I read the details, it states that this is not intended for server side programs where the code will run under a system account.  I want to run the SSIS job weekly from SQL Server Agent.  Is this the correct or should I be using another dll?
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Hi,
can you try to set the delay validation property to true?
stackoverflow.com/questions/748136/ssis-acquireconnection-method-call-to-the-connection-manager-excel-connection
The OOTB driver are fine as long as you use 32bit.
For 64 bit you can use the MS Access drivers package but it seems that its more complicated because BIDS is 32 bit so you would have to install both.
Which SQL server edition and version are you using?
You can also run the agent job using a combo of SQL proxy and SQL credentials to run as a specific domain user.
Avatar of LenTompkins

ASKER

Rainer,
   I changed my application on the Data Flow task for the Excel destination to delay validation property to true.  I then transferred the new code up to the server and changed the data sources to the current database name and server name and the file location for the Excel output.  
I reran the job and got the same error:
Executed as user: HQ\SQLServerHQVSQL01. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.4263.0 for 32-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Argument "Excel" for option "connection" is not valid.  The command line parameters are invalid.  The step failed.

I am using SQL Server 2008 r2.  I am not sure what you mean by your last statement - You can also run the agent job using a combo of SQL proxy and SQL credentials to run as a specific domain user.   Explain further.  
Thanks
I am not sure if you know or if we have covered this in the past, but there is no 64-bit JET driver.
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
The job stream definitely  has "Use 32 bit runtime" enabled, so this time I ran the job from Execute Package Utility and this time I received the following error:
Code:0x00000003
Source: Delete Worksheets if exists
Description: There was an exception while loading Script Task from XML:
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, culture=neutral,
PublicKeyToken=b03f5f7ff11d50a3a' or one of its dependencies.  The system cannot find the file specified.
File name: "Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7ff11d50a3a
  at Microsoft.Sqlerver.IntegrationServices.VSTA.VstaHelper.<Cleanup>b__1a()
  at Microsoft.Sqlerver.IntegrationServices.VSTA.MTaExecution.Run(Action action)
  at Microsoft.Sqlerver.IntegrationServices.VSTA.VstaHelper.Cleanup()
  at Microsoft.Sqlerver.VSTAHosting.VSTAScriptingEngine.DisposeVSTAHelper()

etc  
 until the last line which states
Option "8.0;HDR=Yes\;" is not valid.


Sometimes I get this first detailed error and yet  most other times  when I execute the package in Execute Package Utility I just get :
 Option "8.0;HDR=Yes\;" is not valid.

The way I got this message was :
Within the Execute Package Utility, I selected the Connection Managers
if I check both connection Managers, I receive the simple error: Option "8.0;HDR=Yes\;" is not valid.
The connection string actually has : Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Lincare\CreditRTB_.xls;Extended Properties="EXCEL 8.0;HDR=YES";

Is the server missing "'Microsoft.VisualStudio.Tools.Applications.Core" or is the real problem the Excel output string?
I am going to ask that BIDS be installed on this server, so I can determine what the problem is tomorrow.
I am still waiting for BIDS to get installed on this server, but appreciate the assistance.