0

Windows サービス経由で SSIS パッケージを読み込んで実行しようとしています。コマンドプロンプトを使用して手動で実行すると、うまく機能します。しかし、Windowsサービスを使用して同じようにしようとすると、毎回失敗します。

private void PackageExecute()
    {
        try
        {
            TraceService("Another entry at " + DateTime.Now);
            //Instansiate an DTS RunTime Application Object
            Application app = new Application();
            TraceService("loading system From File system");
            //Create package Container to hold the package.
            //And Load the Package Using the Application Object.
            Package package = app.LoadPackage(@"C:\Users\kavita.verma\Documents\Visual Studio 2012\Projects\WindowsServiceTest\WindowsServiceTest\Package1.dtsx", null);

            TraceService("Execution Started");
            DTSExecResult result = package.Execute();
            // print the result
            TraceService(result.ToString());
            TraceService("Execution Completed");
        }
        catch (Exception ex)
        {
            TraceService("Execution Error" + ex);
        }

    }
4

0 に答える 0