Scenario: We have an SSIS package which has a script task. This script task has a package.Execute() statement which runs another package.
This child package has an 'Execute Process task' which calls an .exe
Both these packages are built using ssis in visual studio 2005. And the parent package was scheduled to run on a Windows 2003 server.
Problem: Now, we have to migrate this job to windows 2008 server. I got SSIS 2005 installed on this system and gave an explicit path to call the package:
"C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.exe" /f "\\ustca974\Share\KC-HC\PRINCE\QA\Scheduler_Package.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V
The script inside the package is like:
Private Sub StartTask()
Dim _errorMsg As System.Text.StringBuilder = New System.Text.StringBuilder("")
Dim str_To As String
Dim str_From As String
Dim str_Message As String
Dim str_Subject As String
Dim isSimulationComplete As Boolean = False
Try
Dim app As Application = New Application()
Dim _PackageVars As Variables = Nothing
Dim _PackagePath As String = System.IO.Path.Combine(Dts.Variables("User::ExecutionPath").Value.ToString, _
Dts.Variables("User::PkgName").Value.ToString)
Dim pck As Package = app.LoadPackage(_PackagePath, Nothing)
_PackagePath = _PackagePath.Replace(System.IO.Path.GetExtension(_PackagePath), ".dtsConfig")
If (pck.Configurations.Count > 0) Then
If System.IO.File.Exists(_PackagePath) Then
pck.Configurations(0).ConfigurationString = _PackagePath
pck.ImportConfigurationFile(pck.Configurations(0).ConfigurationString)
End If
End If
pck.VariableDispenser.GetVariables(_PackageVars)
For Each var As Variable In pck.Variables
If (Not var.SystemVariable) And Dts.Variables.Contains(var.QualifiedName) Then
pck.VariableDispenser.LockForWrite(var.QualifiedName)
var.Value = Dts.Variables(var.QualifiedName).Value
End If
Next
If (_PackageVars.Locked) Then
_PackageVars.Unlock()
End If
UpdateRequestsStatus("3")
pck.Execute()
For Each errorObj As DtsError In pck.Errors
_errorMsg.AppendLine("Source: " & errorObj.Source & vbNewLine & "Desc: " & errorObj.Description)
Next
Dts.TaskResult = pck.ExecutionResult
after migration, the job goes long running at the pck.Execute() statement. It does not throw any error. I tried on my local machine access the package on that server and it works fine. I dont have administrator access on that server so cannot run it there. I feel there is some framework or setup issue. Some thing is missing being installed. But not sure what exactly. Does anyone have any idea? Thanks a lot for the help
Aucun commentaire:
Enregistrer un commentaire