Pages

Saturday, October 17, 2009

Quick Reference: SSIS in 32- and 64-bits

There are quite a few misconceptions flying about out there regarding SQL Server Integration Services and 64 bitness.  I've had to set more than a few people on the right path in the forums - mostly on one particular setting inside the SSIS packages that is getting misinterpreted.  Of course, this information only applies to 64-bit architectures - if you are running a Windows 32-bit OS, you have no choice - your packages will always run in 32-bit mode. 
Why would you want to run in 32-bit mode if you have a 64-bit system?  Drivers, mostly.  I'm not referring to hardware drivers, but data providers.  As an example, Excel and some versions of Oracle don't have 64-bit providers.  So for the ever-increasing base of 64-bit users, here's the skinny on executing Integration Services packages in your choice of 64-bit or 32-bit mode.
Background
I Can Design Fine, Why Won't It Run?
A little background to start.  Business Intelligence Design Studio (BIDS) is a 32-bit application.  When you're designing your package, you're using 32-bit facilities - and have no choice in the matter.  When you execute your package using DTExec, you have the option of 32-bit or 64-bit operation - but the default on a 64-bit installation is to use 64-bit mode (obviously).  However, some commonly used objects in SSIS don't have 64-bit counterparts, and will therefore cause your packages to fail.
Unfortunately, it usually doesn't say anywhere in these messages that the fault lies with 32 vs 64 bits.  It's usually something like:
  • 0x80040154 ... Class Not Registered
  • The AcquireConnection method call to the connection manager XXX failed with error code 0xC0202009
  • 0xC00F9304 ... SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED
  • The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered
(I include those sample errors here in the hope that those searching the web may find this article!)
Why Do I Want 32-bit Mode?
The most common reason to want 32-bit mode in an executing SSIS package is the Excel Provider.  It's currently not available for 64 bits, and will cause your package to crash.  (Office 14 (2010) is reported to have 64-bit support - even though it's not supported side-by-side with 32-bit.)  This applies to the other Office providers as well - Access, specifically - and to several other third party drivers and providers (like Oracle).  They simply will not work in a 64-bit environment (pre-2010).  You may also wish to run Execute DTS 2000 Package Tasks - and those can only run in 32-bit mode as well.
It Depends How You're Executing Your Package
There are many ways to execute an SSIS package - and this is the primary determiner of whether you're running it in 64-bit or 32-bit mode.  So pick your execution environment from the list below, and read up on how to force the bitness you desire.
Choosing Bitness Inside Business Intelligence Development Studio (BIDS)
If you're running your package inside BIDS, the setup is simple unless you're using the Execute Package Task or Execute Process Task to run child packages.
The package you currently have open will (by default) run in 64 bit mode.  The setting that controls this is a property on the project called Run64BitRuntime.  To access this property, right-click on the Integration Services project in your solution explorer and select Properties.  Then select the Debugging node in the editor.  The default here is "true", which means all the packages in this project will run in 64-bit mode.  If you change this to "false", all the packages will be run in 32-bit mode.
Special Note: Execute Package Task
Any child packages executed via the Execute Package Task will run in the same mode as the parent, regardless of the Run64BitRuntime setting of the project that the child package belongs to, regardless of the setting of ExecuteOutOfProcess.  This means that even if your child package has Run64BitRuntime set to false in the project you designed it in, it will be executed in 64-bit mode within BIDS if your parent package's Run64BitRuntime property is true.
Special Note: Execute Process Task
The Execute Process Task can allow you to choose 32-bit mode independently of the settings in the parent package, at the expense of running the child package in another process.  As with the SQL Agent methods described later, you can specifically identify the 32-bit DTExec to run SSIS child packages in 32-bit mode (see below).
Choosing Bitness With SQL Agent
Instructing SQL Agent what environment you want your packages to run in is simple in Integration Services 2008.  SSIS 2005 makes you jump through a few more hoops.
Integration Services 2008
In the Agent Job Step Properties, you'll be using the SQL Server Integration Services Package type of step.  If you go to the Execution Options tab, you'll see an option to "Use 32 bit runtime" down at the bottom.
Integration Services 2005
With SQL 2005, you can not use the Integration Services Package type of job step to run an SSIS package in 32-bit mode.  Your recourse is to use the Operating System type of job step, and refer to the 32-bit version of DTExec specifically in the command line that you use, and manually specify arguments to DTExec.
Hurdle #1 - Finding the 32-bit DTExec
Finding the executable shouldn't be difficult.  In a standard 64-bit installation, the 32-bit DTExec.EXE should be located in the "\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn" folder.  It's plainly called "DTExec.EXE", and doesn't identify itself in any way as a 32-bit app - you'll have to "know" it is by it being located in the 32-bit folder.  (Or you could try to execute it and watch Task Manager.)  If you've installed SQL to a non-standard location, you may have to hunt a little.  If you can't find it at all, you may not have installed the 32-bit components on your 64-bit machine.  During the install of SQL Server, if you only selected "Integration Services" and didn't install "Business Intelligence Development Studio" OR "Management Tools - Complete", then you won't have the 32-bit DTExec installed.  You'll have to run SQL Setup, and install one of those options.
Hurdle #2 - Determining the Command Line Arguments
Next, you need to determine the command line parameters you need to operate DTExec from the command line.  You could read through the documentation and attempt to determine the arguments and settings by yourself, but I would recommend you use the power of the included GUI tools.  Both the IS Job Step in SQL Agent, and the DTExecUI tool provide a GUI to configure an SSIS package run.  On the last page of the GUI, it very helpfully places the exact command line arguments needed to run DTExec, based on all of the configuration options you've chosen on the ten or so other tabs of the GUI.  Leverage that!  Set up your package execution using the GUI, then copy the arguments off that last page.
Precompiled Scripts
This is only an issue in Integration Services 2005 - the dev team completely fixed this issue in SSIS 2008.  There is a "Precompile" option on Script Tasks, which is set to "true" by default.  If this has somehow been set to "false", your packages may not execute in a 64-bit environment.
32-bit ODBC Drivers
There is also one other oddity with using 32-bit ODBC drivers in Windows - at least in Server 2003, 2008, Vista, and Windows 7 64-bit OSes.  The first step to using those drivers is to set up a DSN to handle storing the server name and other particulars.  In my experience, the natural first place to start is by opening the "Data Sources" applet in the Control Panel.  That's mistake #1 - because that applet only manages 64-bit drivers.  You won't see yours listed at all.  The next step is to poke around and realize that there's a "Data Sources (32-bit)" applet there in the Control Panel as well.  That's mistake #2 - but not your mistake.  In my experience, this icon leads to some odd hybrid 32/64 bit management utility.  It definitely did NOT manage my 32-bit sources.  If you fire it up, then look at the processes tab in Task Manager, you'll see a process labeled "odbcad32.exe"... but you'll notice that it doesn't have the "*32" after it denoting that it's a 32-bit app.  Whatever it's attempting to manage, it's not the 32-bit ODBC drivers.  What you need to do is navigate to another odbcad32.exe that's sitting in your SYSWOW64 folder.  That ODBC data source administrator truly does manage 32-bit drivers, in a 32-bit process.
References/Resources
Most (if not all) of this information is also distilled in an MSDN article: 64-bit Considerations for Integration Services.  If you find other useful articles, pointers, or mistakes in the above, please post a comment.
Some other very useful articles:
How To: Run a Package, MSDN
64-bit references within an SSIS Script Component by Michael Entin, Microsoft SSIS Dev.
64-bit Considerations for SQL Server Integration Services by Douglas Laudenschlager, Microsoft SSIS Dev.
Where is my app.config for SSIS? by Darren Green, SQL Server MVP.
Oracle Driver Configuration in a 64-bit environment by Rob Kerr
Importing data from 64-bit Excel in SSIS by Hrvoje Piasevoli
32- and 64-Bit Connectivity from the Same Machine by SQLCAT

55 comments:

  1. I use the following script task to find the 32-bit dtexec:

    Imports System.Runtime.InteropServices

    Public Sub Main()
    Dts.Variables("DtexecPath").Value = GetPathToDtsExecutable("dtexec.exe", False)

    Dts.TaskResult = ScriptResults.Success
    End Sub

    Public Shared Function GetPathToDtsExecutable(ByVal executable As String, ByVal is64bit As Boolean) As String
    Dim sam As Integer = 1
    If is64bit Then
    sam = (sam Or &H100)
    Else
    sam = (sam Or &H200) 'necessary to get the 32-bit EXE path when running inside 64-bit process
    End If
    Dim str As String = Nothing
    Dim zero As IntPtr = IntPtr.Zero
    Dim HKEY_LOCAL_MACHINE As New IntPtr(-2147483646)
    If (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\MSDTS\Setup\DtsPath", 0, sam, zero) = 0) Then
    Dim lpValue As New StringBuilder(260)
    Dim lpcbValue As Integer = (lpValue.Capacity * Marshal.SizeOf(GetType(Char)))
    If (RegQueryValue(zero, "", lpValue, (lpcbValue)) = 0) Then
    str = lpValue.ToString
    End If
    RegCloseKey(zero)
    End If
    If str Is Nothing AndAlso (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Microsoft SQL Server\100\SSIS\Setup\DTSPath", 0, sam, zero) = 0) Then 'prep for katmai
    Dim lpValue As New StringBuilder(260)
    Dim lpcbValue As Integer = (lpValue.Capacity * Marshal.SizeOf(GetType(Char)))
    If (RegQueryValue(zero, "", lpValue, (lpcbValue)) = 0) Then
    str = lpValue.ToString
    End If
    RegCloseKey(zero)
    End If
    If (Not str Is Nothing) Then
    Dim path As String = System.IO.Path.Combine(System.IO.Path.Combine(str, "binn"), executable)
    If File.Exists(path) Then
    Return path
    End If
    End If
    Return Nothing
    End Function


    <DllImport("advapi32")> _
    Private Shared Function RegCloseKey(ByVal hKey As IntPtr) As Integer
    End Function

    <DllImport("advapi32", CharSet:=CharSet.Unicode)> _
    Private Shared Function RegOpenKeyEx(ByVal hKey As IntPtr, ByVal subKey As String, ByVal options As UInt32, ByVal sam As Integer, <Out()> ByRef phkResult As IntPtr) As Integer
    End Function

    <DllImport("advapi32", CharSet:=CharSet.Unicode)> _
    Public Shared Function RegQueryValue(ByVal hKey As IntPtr, ByVal lpSubKey As String, ByVal lpValue As System.Text.StringBuilder, ByRef lpcbValue As Integer) As Integer
    End Function

    End Class

    ReplyDelete
  2. this is nice summary of the ssis 32bit vs. 64bit issues.

    ReplyDelete
  3. Very nice summary. The best I've seen so far on the topic. Thanks so much!

    ReplyDelete
  4. You just saved me a day.

    Thanks for your help on Twitter

    ReplyDelete
  5. Hi Todd, I cannot edit an added Pivot-Task or OLE DB Command Task in Data Flow Tab. When I try it, I receive : Library not registered. (Exception From HRESULT: 0xB002B01D TYPE_E_LIBNOTREGISTERED))

    I run Microsoft SQL Server 2005 - 9.00.4211.00 (X64) and BIDS with Microsoft SQL Server Integration Services Designer
    Version 9.00.4035.00.

    What ca I do?

    best regards

    Timo

    ReplyDelete
  6. Timo, sounds like your install is corrupt - try reinstalling. If you have any other problems, post the details on the MSDN Integration Services Forum.

    ReplyDelete
  7. Todd, great article. I'm trying to schedule an SSIS job on a 64-bit machine to read data from an Access database. The impression I get is that I need to run the 32-bit version of dtexec to run the package. Is that correct? Also, would the command-line arguments for the 32- and 64- bit versions of dtexec be the same? Is there a way to get SQL Agent to run the 32-bit dtexec, or would you have to create a package with a execute process task that runs the 32-bit dtexec.exe?

    ReplyDelete
  8. @amorphous - you've got the right impression. You need to run the 32-bit DTExec. The command line arguments are the same - you just need to specifically start the "Program Files (x86)" executable. Read through the article again - it has instructions on getting SQL Agent to run the 32-bit process - look for "Choosing Bitness With SQL Agent".

    ReplyDelete
  9. Thanks! I was getting so frustrated. (Especially since I was running the ssis package on my local 32bit machine and it worked fine, but when I executed the the job that ran the package from my java code, it was failing!)

    ReplyDelete
  10. I've tried your suggestions, and it actually worked on one of the ssis packages, but the other package still get's errors. I'm on SQL 2008 64 bit, and have the agent changed to run 32 bit, built it using 32 bit, call it from the SSIS Package Store(just like the other agent job), and I still get that file already opened by another user...etc.

    I've copied the spreadsheet and replaced the one I'm trying to open and still no luck. It's a 2003 xls file. Would you have any other ideas?

    ReplyDelete
  11. Does the package that doesn't work happen to use a Script Task to manipulate the Excel sheet using COM interop?
    When the package is running, is there any instance of Excel.exe in the task manager's processes list?

    ReplyDelete
  12. Hi, we ran into this same issue and your solution worked. Question, why does the SSIS package only fail when run from the Agent, when run from Integration Services, it worked fine.

    ReplyDelete
  13. Hi,
    I have a package that gets data from sql server and loads dynamically to excel sheets using the OLEDB provider (office 12).
    This package works on my machine (it is a 32 bit machine - Windows XP)

    I imported this package from my file path to msdb folder on the server (windows 2003 64-bit) and setup a job to run every tuesday. But it fails through the job with some message like "Class is not registered"

    I came across your article - it is very helpful.
    I then tried and set the package properties Run64BitRuntime to False and used the C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.EXE in the command tab of the Agent job step.
    Upon running the job, it still fails.

    Do I have to do something with the ODBC drivers - if so how to set this up (step-by-step instructions) to get my package working.
    Do I have to run the odbcad32.exe (in SYSWOW64 folder) once through cmd prompt and then will my job work fine or is there some other steps that I should follow?

    Please let me know regarding this.
    Thank you for your help in advance.

    ReplyDelete
  14. Sounds like you've done what you need to do - but there are lots of other details that may be causing the issue. Please post all of your paticulars - including the exact error message - at the MSDN SSIS Forums.

    ReplyDelete
  15. Todd,
    I followed the step and checked the Check Box in SQL Agent Job, But I'm getting following error

    Option "/X86" is not valid. The command line parameters are invalid. The step failed.

    ReplyDelete
  16. @Anonymous @ August 18, 2010 12:50 AM...
    You are most likely using SSIS 2005, in which DTExec doesn't have the /X86 switch. You need to explicitly call the correct DTExec - and don't attempt to use a command line generated from SSIS 2008 on an SSIS 2005 installation.

    ReplyDelete
  17. This blog was very much helpful for me. Thanks a lot.

    ReplyDelete
  18. Thanks for this post. It was informative and just what I needed.

    Many thanks.

    ReplyDelete
  19. Hi Todd,

    I'm calling my SSIS packages from my .NET 3.5 web application. I'm developing on WinXP with Office 2007 installed. I've installed my application on a 64bit Windows 2008 R2 Server but it fails with the error "SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available."

    What are my options for executing my packages in this way? Thanks in advance for your assistance.

    ReplyDelete
  20. Your only option is to run your package in 32-bit mode. Excel doesn't support 64-bit mode in 2007, only with 2010 did they adopt 64 bits.

    ReplyDelete
  21. I have a package created from usinghte import data wizard in SSMS. the import works fine, and I can run the saved package from SS Integration server just fine as well.
    When I create a sql agent job torun this package, it fails saying " Description: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR. The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered -- perhaps no 64-bit provider is available. Error code: 0x00000000." why would the package work fine when executed one way, but when executed either by dtexec or sql agent it throws up all over the place? all of our server and applications are 64 bit, so i am stumped.

    ReplyDelete
  22. Read the post again from the top. BIDS is a 32-bit process - so not "everything" on your server is 64-bit. If you can run your package within BIDS, you must have the "Run64BitRuntime" set to false on the project.

    Read the whole post again - you should then understand why your 64-bit server won't run a 32-bit Excel driver without tweaking.

    ReplyDelete
  23. Thanks a lot ..it resolved my issue

    ReplyDelete
  24. Thank you! I got here by googling for "The AcquireConnection method call to the connection manager failed with error code 0xC0209303" and you solved my problem.

    It's been two years, and Microsoft hasn't bothered to write any better error message than that.

    ReplyDelete
  25. Hi Todd,

    I have a ssis package that Drop and Recreate Excel table. The package is as same as the example in http://samuelhaddad.com/2009/03/31/overwriting-an-excel-file-destination-using-ssis/. And it worked fine for Excel 2003 file. Ater I converted the Excel template to Excel 2010, it worked on the 1st step "Drop table `Sheet Name`" (deleted the header row on the sheet). But it failed on the second step "Create Table `Sheet Name`". The error is "Table 'Sheet Name' already exists.". Could you please help me to find out the reason the step failed? I'm using Visual Studio 2008, have the "Run64BitRuntime" set to false and set the connection as "Provider=Microsoft.ACE.OLEDB.12.0" and so on.

    Thanks in advance.

    ReplyDelete
  26. Your problem doesn't have anything to do with 32 or 64 bitness - it's an Excel driver issue. Possibly a difference in 2003 vs 2010. You'd be best served by posting the details at the MSDN SSIS Forum.

    ReplyDelete
  27. Just wanted to say thanks for your post. I've been struggling with a 32-bit issue, and your post pointed me towards the correct checkboxes that I haven't seen referenced elsewhere.

    ReplyDelete
  28. OS : win 2008 R2 64 bit
    SQL: SQL 2008 R2 64 BIT
    installed oracle client 32 bit and 64 bit on same 64 bit machine.
    able to access oracle through oracle provider for oledb
    able to access oracle through MS provider for oledb.
    able to execute package when Run64bitruntime is set to FALSE

    question:

    when scheduling through SQL agent job, I checked the run 32 bit mode in GUI job step, even then the package is failed .
    I have also set the path in system environment variables to execute 32 bit directory and 64 bit directory later...?

    PATH=C:\OraClient\product\11.2.0\client_2\bin;C:\OraClient\product\11.2.0\client
    _1\bin;C:\Program Files (x86)\Oracle;C:\Windows\system32;C:\Windows;C:\Windows\S
    ystem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\
    Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\T
    ools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Co
    mmon7\IDE\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files
    (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual
    Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\GNU\GnuPG\pub

    Any idea how to reslove this...?

    ReplyDelete
  29. Oracle is (apparently) a really tough nut to crack. I can't specifically help you with your issue - but I do know that people have had success with removing the parentheses from the "Program Files (x86)" path - Oracle doesn't like them, I hear.
    This blog post from Jorg Klein looks to have good advice - try that!

    ReplyDelete
    Replies
    1. This blog post has been moved: https://jorgklein.com/2011/06/02/ssis-connect-to-oracle-on-a-64-bit-machine-updated-for-ssis-2008-r2/

      Delete
  30. Thank you! Changing the project setting Run64BitRuntime solved my issues. -jeff

    ReplyDelete
  31. Thank u Todd....Relief after HOURS :)

    ReplyDelete
  32. Thank you so much, Todd! This resolved my issue!

    ReplyDelete
  33. Had problem reading FoxPro .dbf files. Now it works thanks to your article. Would have been impossible to figure out alone.

    Big thanks!!

    ReplyDelete
  34. I recently installed 64-bit office over my 32-bit version. My SSIS in 2012 SQL Server RC0 is giving me the following error concerning Excel sources:

    Validation error. Excel Connection manager "TestA": The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 32-bit driver is not installed, run the package in 64-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".

    How do I work around this issue? I tried both settings available for the Run64BitRuntime and neither one works. When I had 32 bit office I did not have this issue.

    ReplyDelete
  35. What's the trick if you have a parent package that you want to run in 64 bit but have it call some child packages and have them run in 32 bit?

    The only think I can think of is to have the parent package use an execute process task and call the 32 bit version of dtexec and pass in the parameters necessary to execute the 32 bit package. Not the prettiest solution.

    Any better ideas out there?

    ReplyDelete
  36. I have SSIS package which runs fine with Visual studio, clean with no warnings. This package is generating excel files from SQL Server data.
    However when I run the package using SQL Server Agent using the 32 bit command. The package executes successfully generating files however has multiple warnings "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done" Can you explain what must be causing this problem?

    ReplyDelete
  37. Hi there!
    The best place to get that problem looked at is on the MSDN SSIS forums. Please post your scenario there - and include more of the error information. There is more - I guarantee it. Look in the logs before the error you've found - rows with an event of OnError. Post that information up in the forums, and we'll be better able to help you figure it out.

    ReplyDelete
  38. Stacey
    Easy solution is to run Office 2007 32 bit *after* the 64 bit install, as it doesn't do the checks

    ReplyDelete
  39. Also make sure the 32-bit drivers are actually installed. :) Sounds obvious, but I overlooked this at first. I downloaded the drivers from Microsoft's website.

    Bill Zichos

    ReplyDelete
  40. Hi! I have tried almost every suggestion you offered in your article. I have set the Studio package to run in 32 bit mode and checked the box in execution to run in 32 bit more but I cannot get it to run from schedule tasks even though it runs just fine if I run it uin debug mode in Studio. Here is the error I receive each time (even with run in 32 bit mode checked).
    Source: No_Tran_3_Days Connection manager "Excel_Load_Tran_Report" Description: SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available. End Error Error: 2012-06-27 16:11:03.82 Code: 0xC00291EC

    Any Suggestions?

    Thank you

    ReplyDelete
  41. Nothing you do in BIDS will help. You need to check the little "32-bit mode" box in the job step when defining the Agent job, or specify the 32-bit executable directly if you're in 2005.

    ReplyDelete
  42. I have checked the box inside of the job step and I still get that error. Sorry I didn't explain what I had done very well. Any suggestions if even that doesn't seem to work?

    Thank you

    ReplyDelete
  43. Your assertion that you've checked that box is contradicted by the error message that claims the 64-bit mode SSIS execution is being run.
    To properly diagnose this problem, please post complete details (screenshots are nice) to the MSDN SSIS forum, or send me an email directly at at live.ca.

    ReplyDelete
  44. I am not able to post images on the blog for some reason, they become distorted when I try and upload them. I can send them directly to your email if you have some time to help me investigate.

    Thank you in advance.

    ReplyDelete
  45. I used some markup that got lost in the comment (duh).
    Email is [my full name no spaces] at live.ca

    ReplyDelete
  46. Hi Todd,
    I know you wrote this article a couple years back so my question has to do with the Access DBE Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=13255 and how that changes anything. In my scenario, we have development servers that are Windows Server 2008R2 64bit with SQL Server 2008R2 and we don't install MS Office on them. However we did install the 64bit version of the distributable package mentioned above. However when I deploy to that server and run the package through a SQL Agent job, I get the error "The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available" But when I check the "Use 32bit runtime" on the job step, it seems to work. Why is this since the 32bit Office drivers shouldn't be on the server?

    ReplyDelete
  47. Hi Todd,

    I have a 2005 SSIS package which runs a stored procedure and then writes the output in a .csv file. The package works perfectly in development server using BIDS as well as a SQL Agent job. However, when I tried to create the job (using SSIS package not operating system command) in production environment (64-bit clustered environment), the job fails with the following error.

    Executed as user: THETRUSTPORTAL\sqlsvc. ...0.4035.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:48:25 AM Error: 2012-12-05 11:48:55.36 Code: 0xC0202009 Source: MFOR_ORDCONF Connection manager "DBConn" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2012-12-05 11:48:55.36 Code: 0xC020801C Source: Data Flow Task OLE DB Source [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "DBConn" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error: 2012-12-05 11:48:55.36 Code: 0x... The package execution fa... The step failed.

    I don't have access to production environment and dependent on the deployment team to set up webex and do the same. Needless to say, I can't experiment through the settings. I have gone through your article and I find it very useful. I think mine is same issue and can be resolved using Operating System command and explicitly mentioning the DTExec 32-bit path(???) Could you please reconfirm or should I try to check any other pointers too? Also, is there a possibility that 32-bit dtexec is not at all installed in the machine?

    Many thanks in advance.

    ReplyDelete
  48. This is the best explanation
    I found on this topic
    Thank you very much
    Phenich

    ReplyDelete
  49. Most impressive, even after years a very helpful blogpost.
    Thank you very much sir.

    ReplyDelete
  50. Thanks for the tip on how to change from 64 to 32 bit runtime for SSIS. It solved my issue.

    ReplyDelete
  51. Hi Todd,

    I am getting below error when i try to execute a package using batch file

    Microsoft (R) SQL Server Execute Package Utility
    Version 9.00.1399.06 for 64-bit
    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

    Started: 7:15:29 AM
    Progress: 2014-10-01 07:15:36.05
    Source: Data Flow Task
    Validating: 0% complete
    End Progress
    Error: 2014-10-01 07:15:36.05
    Code: 0xC0202009
    Source: ADTM001_UPDATE_COSTS_TIU0560 Connection manager "Excel Connection Manager"
    Description: An OLE DB error has occurred. Error code: 0x80040154.
    An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
    End Error
    Error: 2014-10-01 07:15:36.05
    Code: 0xC020801C
    Source: Data Flow Task Read Data From XLS [1]
    Description: The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.
    End Error
    Error: 2014-10-01 07:15:36.05
    Code: 0xC0047017
    Source: Data Flow Task DTS.Pipeline
    Description: component "Read Data From XLS" (1) failed validation and returned error code 0xC020801C.


    I have tried to use 32 bit exe as well , But then i get below error ,

    Could not load package because of error 0xC0014062.
    Description: The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.). The SQL statement that was issued has failed.

    ReplyDelete
  52. I have SSIS package that works great when run manually but fails when scheduled with SQL Server Agent. This article provided the solution as I was able to resolve the issue after reading the post.

    Thank you so much for this great article.

    Victor.

    ReplyDelete
  53. Great article! Really helped me to resolve a problem today. Not only helped me to understand how things run in 32 and 64 bit modes but how to select and debug a package for each mode.

    Many thanks Todd!

    ReplyDelete