[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jimmy J.

3/20/2007 5:16:00 PM

I have been given a task, with 2 parts, which I've never used. I've searched
this newsgroup, as well as the net and haven't come up with an exact
solution, so I need to ask for help.

We have a stored procedure here at work, that has been scheduled to run (in
a dts package), nightly. However, after a month, we find that it's been
erroring out every night.

I've been given the task to change the sProc so that, in the case of an
error of any kind, send an email to my boss and me.

Could someone either help me out directly here, or point me to a tutorial
where I can learn how this can be accomplished?

Thanks


4 Answers

Russell Fields

3/20/2007 6:18:00 PM

0

Elmo,

If this is a scheduled job in SQL Agent running on SQL Server 2000, then set
the Notifications tab of the job properties, set the job to email you in
case of an error.

If the job history shows the errors, then this will work for you, but if the
job history shows no errors then SQL Agent will not notify of them. (They
may be logical errors, but not SQL Server errors.)

This way you do not have to write code to catch the error.

RLF
"ElmoWatson" <bilboB@yahoo.com> wrote in message
news:OqP8DOxaHHA.4948@TK2MSFTNGP05.phx.gbl...
>I have been given a task, with 2 parts, which I've never used. I've
>searched
> this newsgroup, as well as the net and haven't come up with an exact
> solution, so I need to ask for help.
>
> We have a stored procedure here at work, that has been scheduled to run
> (in
> a dts package), nightly. However, after a month, we find that it's been
> erroring out every night.
>
> I've been given the task to change the sProc so that, in the case of an
> error of any kind, send an email to my boss and me.
>
> Could someone either help me out directly here, or point me to a tutorial
> where I can learn how this can be accomplished?
>
> Thanks
>
>


Ross Culver

3/20/2007 6:28:00 PM

0

If you're using SQL 2005, you'll want to use Database Mail. It's 100 times
easier than the old SQL 2000 xp_sendmail.

Ross

"ElmoWatson" <bilboB@yahoo.com> wrote in message
news:OqP8DOxaHHA.4948@TK2MSFTNGP05.phx.gbl...
>I have been given a task, with 2 parts, which I've never used. I've
>searched
> this newsgroup, as well as the net and haven't come up with an exact
> solution, so I need to ask for help.
>
> We have a stored procedure here at work, that has been scheduled to run
> (in
> a dts package), nightly. However, after a month, we find that it's been
> erroring out every night.
>
> I've been given the task to change the sProc so that, in the case of an
> error of any kind, send an email to my boss and me.
>
> Could someone either help me out directly here, or point me to a tutorial
> where I can learn how this can be accomplished?
>
> Thanks
>
>


Jimmy J.

3/20/2007 6:28:00 PM

0

I right clicked on the DTS package, itself, and chose Schedule, to enter the
times I wanted it to run.

"Russell Fields" <russellfields@nomail.com> wrote in message
news:OcxdIwxaHHA.4396@TK2MSFTNGP06.phx.gbl...
> Elmo,
>
> If this is a scheduled job in SQL Agent running on SQL Server 2000, then
set
> the Notifications tab of the job properties, set the job to email you in
> case of an error.
>
> If the job history shows the errors, then this will work for you, but if
the
> job history shows no errors then SQL Agent will not notify of them. (They
> may be logical errors, but not SQL Server errors.)
>
> This way you do not have to write code to catch the error.
>
> RLF
> "ElmoWatson" <bilboB@yahoo.com> wrote in message
> news:OqP8DOxaHHA.4948@TK2MSFTNGP05.phx.gbl...
> >I have been given a task, with 2 parts, which I've never used. I've
> >searched
> > this newsgroup, as well as the net and haven't come up with an exact
> > solution, so I need to ask for help.
> >
> > We have a stored procedure here at work, that has been scheduled to run
> > (in
> > a dts package), nightly. However, after a month, we find that it's been
> > erroring out every night.
> >
> > I've been given the task to change the sProc so that, in the case of an
> > error of any kind, send an email to my boss and me.
> >
> > Could someone either help me out directly here, or point me to a
tutorial
> > where I can learn how this can be accomplished?
> >
> > Thanks
> >
> >
>
>


Russell Fields

3/20/2007 7:30:00 PM

0

Elmo,

Yes, and doing that created a SQL Agent job. If you look on Enterprise
Manager under Management \ SQL Server Agent \ Jobs you should see a job name
that you can recognize as associated to your DTS package.

You can view the history of that job and set the notifications as describe
earlier.

RLF

"ElmoWatson" <bilboB@yahoo.com> wrote in message
news:O20HA2xaHHA.5044@TK2MSFTNGP04.phx.gbl...
>I right clicked on the DTS package, itself, and chose Schedule, to enter
>the
> times I wanted it to run.
>
> "Russell Fields" <russellfields@nomail.com> wrote in message
> news:OcxdIwxaHHA.4396@TK2MSFTNGP06.phx.gbl...
>> Elmo,
>>
>> If this is a scheduled job in SQL Agent running on SQL Server 2000, then
> set
>> the Notifications tab of the job properties, set the job to email you in
>> case of an error.
>>
>> If the job history shows the errors, then this will work for you, but if
> the
>> job history shows no errors then SQL Agent will not notify of them. (They
>> may be logical errors, but not SQL Server errors.)
>>
>> This way you do not have to write code to catch the error.
>>
>> RLF
>> "ElmoWatson" <bilboB@yahoo.com> wrote in message
>> news:OqP8DOxaHHA.4948@TK2MSFTNGP05.phx.gbl...
>> >I have been given a task, with 2 parts, which I've never used. I've
>> >searched
>> > this newsgroup, as well as the net and haven't come up with an exact
>> > solution, so I need to ask for help.
>> >
>> > We have a stored procedure here at work, that has been scheduled to run
>> > (in
>> > a dts package), nightly. However, after a month, we find that it's been
>> > erroring out every night.
>> >
>> > I've been given the task to change the sProc so that, in the case of an
>> > error of any kind, send an email to my boss and me.
>> >
>> > Could someone either help me out directly here, or point me to a
> tutorial
>> > where I can learn how this can be accomplished?
>> >
>> > Thanks
>> >
>> >
>>
>>
>
>