none
Run64BitRuntime property in ssis 2008 programatically

    Question

  • Hello All

    We are creating the SSIS packages programmatic way and executing the package programatically and we have a problem with the excel file type loading as it is not having the 64-bit jet provider.

    How can we do this programatically???

    Thanks

    Srikanth.BLN

    Wednesday, September 15, 2010 5:30 AM

Answers

  • The Run64BitRuntime property applies to the project - NOT to the package, and only applies when you're running the package within BIDS - NOT when you're executing a package programatically.

    In order to ensure that your package will execute properly with the Excel provider in 32-bit mode, you need to ensure that your application that is calling Execute is running in 32-bit process space.  If your application is running in 64-bit process space, then calling Execute loads the package inside your process space and attempts to run it.  There are NO settings that can change this behaviour.

    If you can't ensure that your application starts in a 32-bit process space - or you don't want to because your application takes advantage of 64 bits, then you need to spawn another process to run the package.  There are a multitude of ways to do this, but the simplest is to "shell out" to the OS and call the 32-bit DTExec executable as Reza has suggested.


    Todd McDermid's Blog Talk to me now on
    Wednesday, September 15, 2010 6:24 AM
    Moderator

All replies

  • you can use 32 bit version of DTEXEC from here:

    <drive> :\Program Files(x86)\Microsoft SQL Server\100\DTS\Binn

    and use command prompt to run it

     

    but for running this from .net code, you can use Process.Start to run a command in .net


    http://www.rad.pasfu.com
    Wednesday, September 15, 2010 5:40 AM
    Moderator
  • Please look into the  code snippet

    'For creating the SSIS package

    Dim pkg As New Package()

    'For Executing the package

    pkg.Execute()

     

    Can we do this programatically(Setting the property of running the package in 32-bit mode)

    Wednesday, September 15, 2010 5:47 AM
  • I can't find any 32-bit or 64-bit option to run package programmatically.

    so I think these ways exist:

    1- do my first suggestion with process.start and running 32-bit dtexec from code.

    or

    2- change environment variables for dtexec,

    By default, a 64-bit computer that has both the 64-bit and 32-bit versions of an Integration Services command prompt utility installed will run the 32-bit version at the command prompt. The 32-bit version runs because the directory path for the 32-bit version appears in the PATH environment variable before the directory path for the 64-bit version. (Typically, the 32-bit directory path is <drive> :\Program Files(x86)\Microsoft SQL Server\100\DTS\Binn, while the 64-bit directory path is <drive> :\Program Files\Microsoft SQL Server\100\DTS\Binn.)

    reference:

    http://msdn.microsoft.com/en-us/library/ms141766.aspx


    http://www.rad.pasfu.com
    Wednesday, September 15, 2010 5:58 AM
    Moderator
  • The Run64BitRuntime property applies to the project - NOT to the package, and only applies when you're running the package within BIDS - NOT when you're executing a package programatically.

    In order to ensure that your package will execute properly with the Excel provider in 32-bit mode, you need to ensure that your application that is calling Execute is running in 32-bit process space.  If your application is running in 64-bit process space, then calling Execute loads the package inside your process space and attempts to run it.  There are NO settings that can change this behaviour.

    If you can't ensure that your application starts in a 32-bit process space - or you don't want to because your application takes advantage of 64 bits, then you need to spawn another process to run the package.  There are a multitude of ways to do this, but the simplest is to "shell out" to the OS and call the 32-bit DTExec executable as Reza has suggested.


    Todd McDermid's Blog Talk to me now on
    Wednesday, September 15, 2010 6:24 AM
    Moderator
  • all you need to do is point to the correct dtexec.exe to execute the packge. The folder differs in both 32 & 64 bit machines and applications.

    the exe used for 32 bit is at C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\dtexec.exe

    and 64 bit is at

    C:\Program Files\Microsoft SQL Server\100\DTS\Binn\dtexec.exe

    check this page for more details : http://sql.geekepisodes.com/2010/excel-and-ssis-64-bit-connections/


    http://sql.geekepisodes.com
    Wednesday, September 15, 2010 7:46 AM
  • Hello All

    We are creating the SSIS packages programmatic way and executing the package programatically and we have a problem with the excel file type loading as it is not having the 64-bit jet provider.

    How can we do this programatically???

    Thanks

    Srikanth.BLN


    Right-click on your project and select Properties . Go to the Build tab and change "Platform target:" to [x86]. This change will make your application 32bit mode only and therefore allow you to use Excel .

    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
    Wednesday, September 15, 2010 11:21 PM