Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Precedence Constraint failure help

Status
Not open for further replies.

nc297

Programmer
Apr 7, 2010
162
US
I have set up a Precedence Constraint on my SSIS Package. I added a script task and added this script:

Public Sub Main()

Dim fi As System.IO.FileInfo
fi = New System.IO.FileInfo("\\sb25\downloads$\Offsets\SSISDiaries.txt")


If fi.LastWriteTime.Date = DateTime.Today Then
Dts.TaskResult = Dts.Results.Success
Else
Dts.TaskResult = Dts.Results.Failure
End If


Next I added a Precedence Constraint to my SSIS package and configured it as such:

Evaluation operation = Constraint
Value = Success

Now I want to set up something if it's fails. How do I do that?




 
Okay finally got it all to work.

Here's the Script Task I used in SSIS:

Public Sub Main()

Dim fi As System.IO.FileInfo
fi = New System.IO.FileInfo("\\sb25\downloads$\Offsets\SSISDiaries.txt")

If fi.LastWriteTime.Date = DateTime.Today Then
Dts.TaskResult = Dts.Results.Success
Else
Dts.TaskResult = Dts.Results.Failure
End If


Then I added a Precedence Constraint to my SSIS package and configured it as:

Evaluation operation = Constraint
Value = Success

I built the SSIS Package, went into D:/location/bin/deployment and executed that deployment package. I next imported my SSIS package in SQL Server, created a job and scheduled it to run. I next went to notifications and added my email info (Oh I added myself as an Operator so I can receive emails).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top