Monday, March 12, 2012

Execute SSIS package without SSIS console

Hello,

How can i do to execute SSIS package without SSIS console ?

This can occur when you use a hosted database with your hosted web.

thanksHi,
I'm not quite sure what you mean by the SSIS console.

Packages can be executed using DTExec - a command line execution tool. You can also execute packages from managed code.

Does this help?

-Jamie|||Do you mean that i can execute a dts package from an aspx web page ?|||

Coroebus wrote:

Do you mean that i can execute a dts package from an aspx web page ?

Yes. Search this forum for clues.

You should use the Microsoft.SqlServer.ManagedDTS assembly

A few links:
ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/dtsref9mref/html/T_Microsoft_SqlServer_Dts_Runtime_Package_Members.htm
ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/dtsref9mref/html/M_Microsoft_SqlServer_Dts_Runtime_Package_Execute.htm
-Jamie|||Also, please see the Books Online topic, "Running an Existing Package using Visual Basic."

-Doug
|||

Is there any performance difference in running it from CLR and dtsui or command

vb code link:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/2f9fc1a8-a001-4c54-8c64-63b443725422.htm

Dim app As New Application
Dim pkg As New Package
Dim pkgLocation As String
Dim pkgResults As DTSExecResult

pkgLocation = "C:\\Program Files\\Microsoft SQL Server\90\Samples\\Integration Services\\Package Samples\\CalculatedColumns Sample\\CalculatedColumns\\CalculatedColumns.dtsx"

pkg = app.LoadPackage(pkgLocation, Nothing, True)

pkgResults = pkg.Execute()

|||There might be some performance difference due to different reporting, but for most packages it is very small. It might be noticeable if you execute very fast tasks in a loop.

Designer UI and DtExecUI has some overhead to show the package progress and logging. Designer also executes package out-of-process to ensure designer stability, so it might be slower than other options.

DtExec speed depends on amount of logging and event reporting you turn on using command line.

Executing programmatically does not have any performance penalty.

In the code above please use
pkg = app.LoadPackage(pkgLocation, Nothing)
i.e. use two-argument version of LoadPackage method.

(If you pass True to three-argument version, you get neutral-threaded package COM object, which might be somewhat slower for execution. It is better and faster for package manipulation though).
|||

Is there an alternative LoadPackage method for when the Package is contained within the MSDB database vs. the File System?

Thanks

|||

Steve in Crystal Lake Illinios wrote:

Is there an alternative LoadPackage method for when the Package is contained within the MSDB database vs. the File System?

Thanks

Of course, see Application object documentation in Books Online. There are LoadFromSqlServer and LoadFromDtsServer methods.

|||

Is it possible to set this dtsx file to be scheduled from 6 am to 6 pm from monday to friday ?

Thanks a lot

|||

This is a snippet of code of our vb service:

"Fic" is when you have your dtsx allocated on Windows folder

"Sql" is allocated on MSDB

"dts" is allocated on SSIS Package Store (both Sql Server and Windows folder)

Select Case ObjSSIS.sSourceType

Case "Fic"
pkg = app.LoadPackage(ObjSSIS.sRutaDts & ObjSSIS.sSSISName & ".dtsx", Nothing, True)


Case "Sql"
pkg = app.LoadFromSqlServer(ObjSSIS.sRutaDts & ObjSSIS.sSSISName, ObjSSIS.sServer, Nothing, Nothing, Nothing)
Case "dts"
pkg = app.LoadFromDtsServer(ObjSSIS.sRutaDts & ObjSSIS.sSSISName, ObjSSIS.sServer, Nothing)
Case Else
Throw New ArgumentException("El paquete SSIS no tiene ubicaciĆ³n")
End Select

No comments:

Post a Comment