简体   繁体   中英

How do I retrieve SSIS package logging from ASP NET after/during execution? (C#)

I am executing an SSIS package from an ASP NET web form.

How can I programmatically obtain the actually logging information, rather than the basic execution "Success" or "Failed" execution results when I am using the execution procedure below?

myPackage = app.LoadPackage(packageLocation, null);
myPackage.Execute()

I am aware of the basic package execution result (shown below) but I want more details, similar to the log files obtainable through SSIS debugging.

 DTSExecResult myResult = myPackage.Execute();
 lblStatus.Text = "Package result: " + myResult.ToString();

You should be able to accomplish this using some of the logging methods available to the SSIS package itself in Microsoft.SqlServer.Dts.Runtime.Package .

Specifically you should be able to reference DtsContainer.LogEntryInfos for the package in order to view all of the associated log entries. In your case this woudl be deletePkg .

我不知道实时获取它的任何方法,但是您可能正在登录到表或文件,因此可以通过对表的SQL查询或文件的文件流来检索日志。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM