Showing posts with label platform. Show all posts
Showing posts with label platform. Show all posts

Tuesday, March 27, 2012

EXECUTING PACKAGES from vb.net

Hello:
I have a web application from where I need to execute a DTS,
my platform is SQL 2000 and .net 2003. From a Vb.net module I want to
execute the package, my question is: does the package need to be STRUCTURED
STORAGE FILE or could it be SQL SERVER package (local to the server) in
order to be executed from .NET.
- If I can execute the local SQL package , how can I do it?
- If I can only execute STRUCTURED STORAGE FILE, how can I get ride off of
the multiple versions that are created everytime the package is opened and I
make any update on it.
ThanksGina Hernandez wrote:
> Hello:
> I have a web application from where I need to execute a DTS,
> my platform is SQL 2000 and .net 2003. From a Vb.net module I want
to
> execute the package, my question is: does the package need to be STRUCTUR
ED
> STORAGE FILE or could it be SQL SERVER package (local to the server) in
> order to be executed from .NET.
> - If I can execute the local SQL package , how can I do it?
> - If I can only execute STRUCTURED STORAGE FILE, how can I get ride off o
f
> the multiple versions that are created everytime the package is opened and
I
> make any update on it.
> Thanks
>
I assume you could go both ways, or you could use the dts com class in
.NET, without using a storage file or an sql package.
Steven|||> execute the package, my question is: does the package need to be
> STRUCTURED STORAGE FILE or could it be SQL SERVER package (local to the
> server) in order to be executed from .NET.
To expand on Steven's response, you can use the DtsPackage LoadFromSqlServer
or LoadFromStorageFile methods depending on the package location.

> how can I get ride off of the multiple versions that are created everytime
> the package is opened and I make any update on it.
If you delete the file before saving (or save to a new name and rename),
only the current version is saved.
Hope this helps.
Dan Guzman
SQL Server MVP
"Gina Hernandez" <pdwhitt@.nospam.wdsinc.com> wrote in message
news:uIHXLnlBGHA.3156@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I have a web application from where I need to execute a DTS,
> my platform is SQL 2000 and .net 2003. From a Vb.net module I want
> to execute the package, my question is: does the package need to be
> STRUCTURED STORAGE FILE or could it be SQL SERVER package (local to the
> server) in order to be executed from .NET.
> - If I can execute the local SQL package , how can I do it?
> - If I can only execute STRUCTURED STORAGE FILE, how can I get ride off
> of the multiple versions that are created everytime the package is opened
> and I make any update on it.
> Thanks
>

Executing package from C# on 64bit platform

Hi

I have been successfully executing a series of IS packages from C# using the following syntax

Microsoft.SqlServer.Dts.Runtime.Package package;
package = app.LoadPackage(ISPackagePath + @."\myPackage.dtsx", null);
package.ImportConfigurationFile(ISPackagePath + @."\MyConfiguration.dtsConfig");
result = package.Execute();
package.Dispose();

My client has just moved their SQL boxes to a 64bit platform and this process no longer runs.

Now im also running some packages in a SQL Agent job on the SQL box and im aware of the issue of an SSIS job step defaulting to using the 64bit version of DTExec.exe. Ive updated those job steps to be operating system (cmdExec) type steps calling the 32bit version of DTExec.exe, and everything is fine there.

Is there anyway to force the Microsoft.SqlServer.Dts.Runtime.Package object in my C# code to use the 32bit version of DTEexec.exe? This code is running on the same 64bit SQL server box as the SQL agent job. Or will Microsoft.SqlServer.Dts.Runtime.Package object always default to using the 64 bit version if it is executed on a 64bit box ?

I would just call sp_start_job from C# and implement the IS packages in another job but unfortunatly my code cannot be given correct permissions to see the SQL agent jobs.

Any ideas?
Thanks

In a mixed platform environment you have to compile your code with AnyCPU instead of 32bits so just open your solutions in VS2005 and rebuild your code with AnyCPU and it will run in 64bits box. There maybe some configuration relevant to SSIS but in most mixed platform build with AnyCPU should fix it. I develop C# .NET applications with Oracle 9i/10g both 64bits with AnyCPU without any problems. Hope this helps.

|||

Caddre wrote:

I want to know about the performance using oracle packages in c#.net

Bhavin.

Bhavin_82@.hotmail.com

sql