dbTalk Databases Forums  

Precedence Constraint question

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Precedence Constraint question in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jj297
 
Posts: n/a

Default Precedence Constraint question - 04-07-2010 , 10:19 AM






I set up a Precedence Constraint on my SSIS Package. I created 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 I have the

Evaluation operation = Constraint
Value = Success

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

Reply With Quote
  #2  
Old   
jj297
 
Posts: n/a

Default Re: Precedence Constraint question - 04-07-2010 , 01:43 PM






On Apr 7, 11:19*am, jj297 <nchildress... (AT) gmail (DOT) com> wrote:
Quote:
I set up a Precedence Constraint on my SSIS Package. *I created 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 I have the

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.


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).

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.