How to run a ssis package from .net code in 32-bit mode on a 64bit - sqlserver-dts
This is a discussion on How to run a ssis package from .net code in 32-bit mode on a 64bit - sqlserver-dts ; Dear all I have an .net 2.0 windows application that runs ssis packages. On of the packages uses an excel source as data flow source. This works fine as long the executing machine is a 32-bit box. As you know ...
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| I have an .net 2.0 windows application that runs ssis packages. On of the packages uses an excel source as data flow source. This works fine as long the executing machine is a 32-bit box. As you know - Microsoft OLE DB Provider for Jet, used for Access and Excel databases, is not available in a 64-bit version. If I now want to start this package with an excel source on a 64-bit box, I want to start it there in 32-bit mode. But I do not know appropriate command. Does this .net code exist? Or a workaroud? Thanks in advance for your help! Regards, Marc |
|
#2
| |||
| |||
|
Hello Marc, How do you call the package? By default on a 64 bit box it will look for a 64 bit driver. If using DTExec you should look for the 32bit version (Program Files (X86) Have a look here as well. http://msdn2.microsoft.com/en-us/library/ms141766.aspx Allan > Dear all > > I have an .net 2.0 windows application that runs ssis packages. On of > the packages uses an excel source as data flow source. This works fine > as long the executing machine is a 32-bit box. As you know - Microsoft > OLE DB Provider for Jet, used for Access and Excel databases, is not > available in a 64-bit version. > > If I now want to start this package with an excel source on a 64-bit > box, I want to start it there in 32-bit mode. But I do not know > appropriate command. Does this .net code exist? Or a workaroud? > > Thanks in advance for your help! > > Regards, > > Marc > |
|
#3
| |||
| |||
|
Hi Allan As a matter of fact I installed a webservice which executes the packages. I got this code from msdn (http://msdn2.microsoft.com/en-us/library/ms403355.aspx). My application now calls this webservice and fails because it executes in 64bit mode. Thanks for your help! Regards, Marc using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using Microsoft.SqlServer.Dts.Runtime; using System.IO; [WebService(Namespace = "http://dtsue/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class LaunchSSISPackageServiceCS : System.Web.Services.WebService { public LaunchSSISPackageServiceCS() { } // LaunchPackage Method Parameters: // 1. sourceType: file, sql, dts // 2. sourceLocation: file system folder, (none), logical folder // 3. packageName: for file system, ".dtsx" extension is appended [WebMethod] public int LaunchPackage(string sourceType, string sourceLocation, string packageName) { string packagePath; Package myPackage; Application integrationServices = new Application(); // Combine path and filename. packagePath = Path.Combine(sourceLocation, packageName); switch(sourceType) { case "file": // Package is stored as a file. // Add extension if not present. if (String.IsNullOrEmpty(Path.GetExtension(packagePat h))) { packagePath = String.Concat(packagePath, ".dtsx"); } if (File.Exists(packagePath)) { myPackage = integrationServices.LoadPackage(packagePath, null); } else { throw new ApplicationException("Invalid file location: "+packagePath); } break; case "sql": // Package is stored in MSDB. // Combine logical path and package name. if (integrationServices.ExistsOnSqlServer(packagePath , ".", String.Empty, String.Empty)) { myPackage = integrationServices.LoadFromSqlServer(packageName, "(local)", String.Empty, String.Empty, null); } else { throw new ApplicationException("Invalid package name or location: "+packagePath); } break; case "dts": // Package is managed by SSIS Package Store. // Default logical paths are File System and MSDB. if (integrationServices.ExistsOnDtsServer(packagePath , ".")) { myPackage = integrationServices.LoadFromDtsServer(packagePath, "localhost", null); } else { throw new ApplicationException("Invalid package name or location: "+packagePath); } break; default: throw new ApplicationException("Invalid sourceType argument: valid values are 'file', 'sql', and 'dts'."); } return (Int32)myPackage.Execute(); } } M |
|
#4
| |||
| |||
|
Hello Marc, As you know, since OLE DB Provider for Jet is only for 32 bit, you shall run 32bit version of DTExec as Allan said. The DTSruntime you referenced in the application is still 64 bit. You may consider using process.start method to run an application in .net program: http://msdn2.microsoft.com/en-us/lib...ocess.start.as px http://msdn2.microsoft.com/en-us/library/h6ak8zt5.aspx If you have further questions or concerns, please feel free to let us know. Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
|
#5
| |||
| |||
|
Hello Peter Thanks for your reply. I'm implementing this well working method in my webservice. Best regards, Marc |
|
#6
| |||
| |||
|
Hello Roger, Welcome! If you need any further help on this issue, please feel free to post back. Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
|
#7
| |||
| |||
|
i am not able to find the folder "program files(x86)". is this a standard installation or custom installation option? "Allan Mitchell" news:5aaa44808d348c876311f2813f0@msnews.microsoft. com... > Hello Marc, > > > How do you call the package? > > By default on a 64 bit box it will look for a 64 bit driver. > If using DTExec you should look for the 32bit version (Program Files (X86) > > > Have a look here as well. > > http://msdn2.microsoft.com/en-us/library/ms141766.aspx > > > Allan > > > >> Dear all >> >> I have an .net 2.0 windows application that runs ssis packages. On of >> the packages uses an excel source as data flow source. This works fine >> as long the executing machine is a 32-bit box. As you know - Microsoft >> OLE DB Provider for Jet, used for Access and Excel databases, is not >> available in a 64-bit version. >> >> If I now want to start this package with an excel source on a 64-bit >> box, I want to start it there in 32-bit mode. But I do not know >> appropriate command. Does this .net code exist? Or a workaroud? >> >> Thanks in advance for your help! >> >> Regards, >> >> Marc >> > > |
|
#8
| |||
| |||
| Pete, I hope you were able to find what you needed. Scott *** Sent via Developersdex http://www.developersdex.com *** |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 05:42 PM.

Linear Mode