Showing posts with label failure. Show all posts
Showing posts with label failure. Show all posts

Thursday, March 22, 2012

Email task failure urgent

i use email task and it dosent send an email at all....this task causes an error..

If i need to set up email for the package if the package fails...

or how should i set in the sql server agent...iknow there is an option there but i dont know how to..

Please let me know...

Sureshv,

Please post the error.

|||

Here is the error

[Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.".

|||Did you create an appropriate SMTP connection to your mail server? When editing the Send Mail task you'll be able create an SMTP connection. Make sure the information is correct and that you have permissions to the SMTP server.|||

Here is what i did..

I droped the send mail task to my control flow.

then smtp connection :i typed in the ip address

from:i typed in some email address

to :i typed in my email address

message source type:variable(dont know just put int theses)

message ource User::Variable( " )

priority normal...

when i run i come of with this message.

please let me know if i am right

|||MessageSourceType is exactly what it says. The message of the e-mail is either directly input in the box below, or it is a variable that already has the message assigned to it, or it is contained in a file somewhere.

Try to make sure the IP address is really an SMTP server and that it is accepting anonymous connections:

In windows, Start->Run->cmd.exe

From there, "telnet your-ip-address-here 25"

If you get something to come up, then simply type "quit".|||

i checked as u asked me to " telnet your-ip-address-here 25" it was jus blank and the came up with c:\documents and settigs\my name>

Whats that 25 for?

|||

sureshv wrote:

i checked as u asked me to " telnet your-ip-address-here 25" it was jus blank and the came up with c:\documents and settigs\my name>

Whats that 25 for?

It should've done something. Some message should've shown up.

telnet 111.222.333.444 25

"25" indicates the port on the server. Port 25 is the SMTP port.|||thanks..how to set this to a group of people receiving email...i want to set this email only on error in the package how do i set this..|||how to send email only on failure?|||Use the red arrows in the control flow to hook up to a send mail task.|||

i wonder if there are read arrows to data flow,execute sql etc...

|||Sorry. When you connect (for instance) a data flow to a send mail task, the arrow will initially be green. Double click on the arrow and change the "Value" parameter from "Success" to "Failure."

Then the arrow will turn red.|||thanks|||

I have data flow (DB1 to DB2) task and then send mail task. The package executes everyday and mail notificate sent regularly. But if DB1 or DB2 connection failed (due to expired password or server not available or any network issues), the package failing in validation stage itself and send mail task never executed.

The expected result is, email must be sent with the result of data flow task.

Anyone comments please

Email task failure urgent

i use email task and it dosent send an email at all....this task causes an error..

If i need to set up email for the package if the package fails...

or how should i set in the sql server agent...iknow there is an option there but i dont know how to..

Please let me know...

Sureshv,

Please post the error.

|||

Here is the error

[Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.".

|||Did you create an appropriate SMTP connection to your mail server? When editing the Send Mail task you'll be able create an SMTP connection. Make sure the information is correct and that you have permissions to the SMTP server.|||

Here is what i did..

I droped the send mail task to my control flow.

then smtp connection :i typed in the ip address

from:i typed in some email address

to :i typed in my email address

message source type:variable(dont know just put int theses)

message ource User::Variable( " )

priority normal...

when i run i come of with this message.

please let me know if i am right

|||MessageSourceType is exactly what it says. The message of the e-mail is either directly input in the box below, or it is a variable that already has the message assigned to it, or it is contained in a file somewhere.

Try to make sure the IP address is really an SMTP server and that it is accepting anonymous connections:

In windows, Start->Run->cmd.exe

From there, "telnet your-ip-address-here 25"

If you get something to come up, then simply type "quit".|||

i checked as u asked me to " telnet your-ip-address-here 25" it was jus blank and the came up with c:\documents and settigs\my name>

Whats that 25 for?

|||

sureshv wrote:

i checked as u asked me to " telnet your-ip-address-here 25" it was jus blank and the came up with c:\documents and settigs\my name>

Whats that 25 for?

It should've done something. Some message should've shown up.

telnet 111.222.333.444 25

"25" indicates the port on the server. Port 25 is the SMTP port.|||thanks..how to set this to a group of people receiving email...i want to set this email only on error in the package how do i set this..|||how to send email only on failure?|||Use the red arrows in the control flow to hook up to a send mail task.|||

i wonder if there are read arrows to data flow,execute sql etc...

|||Sorry. When you connect (for instance) a data flow to a send mail task, the arrow will initially be green. Double click on the arrow and change the "Value" parameter from "Success" to "Failure."

Then the arrow will turn red.|||thanks|||

I have data flow (DB1 to DB2) task and then send mail task. The package executes everyday and mail notificate sent regularly. But if DB1 or DB2 connection failed (due to expired password or server not available or any network issues), the package failing in validation stage itself and send mail task never executed.

The expected result is, email must be sent with the result of data flow task.

Anyone comments please

Email Subscription random failure

Hi folks,
I installed SP1 onto our development box in hope this would fix an issue with Email subscriptions failing on occasion to send. The problem is that random subscriptions are not firing after the report content is update and notification is not sent to the subscribers.
After installing SP1 on our dev boxes it appears to happen less often but still occasionally loosing one of the 9 email subscriptions i'm sending to myself. When i check the report the content of the snapshot was refreshed but the last run date for the subscription is for the previous day.
Any ideas?Do you see anything in the log files indicating a failure?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote in
message news:3F1EAEF9-4902-4C10-B3A7-370E00E92750@.microsoft.com...
> Hi folks,
> I installed SP1 onto our development box in hope this would fix an issue
with Email subscriptions failing on occasion to send. The problem is that
random subscriptions are not firing after the report content is update and
notification is not sent to the subscribers.
> After installing SP1 on our dev boxes it appears to happen less often but
still occasionally loosing one of the 9 email subscriptions i'm sending to
myself. When i check the report the content of the snapshot was refreshed
but the last run date for the subscription is for the previous day.
> Any ideas?|||Just to make sure, you are not expecting these on History snapshots are you?
Only report execution snapshots will generate the correct event for a
subscription.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote in
message news:C7D230A4-D3B0-47C4-922F-86EECC7EF7F2@.microsoft.com...
> I checked all the log files and there are no entries at all for those
items. It seems to be only happening when you setup subscriptions to send
when content is refreshed.
> "Daniel Reib [MSFT]" wrote:
> > Do you see anything in the log files indicating a failure?
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote
in
> > message news:3F1EAEF9-4902-4C10-B3A7-370E00E92750@.microsoft.com...
> > > Hi folks,
> > >
> > > I installed SP1 onto our development box in hope this would fix an
issue
> > with Email subscriptions failing on occasion to send. The problem is
that
> > random subscriptions are not firing after the report content is update
and
> > notification is not sent to the subscribers.
> > >
> > > After installing SP1 on our dev boxes it appears to happen less often
but
> > still occasionally loosing one of the 9 email subscriptions i'm sending
to
> > myself. When i check the report the content of the snapshot was
refreshed
> > but the last run date for the subscription is for the previous day.
> > >
> > > Any ideas?
> >
> >
> >|||These email subscriptions are on the report execution snapshots. For now i'm going to be working around the issue and just setting up a seperate schedule for the emailing to (hopefully) occure after all reports are rendered.
"Daniel Reib [MSFT]" wrote:
> Just to make sure, you are not expecting these on History snapshots are you?
> Only report execution snapshots will generate the correct event for a
> subscription.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote in
> message news:C7D230A4-D3B0-47C4-922F-86EECC7EF7F2@.microsoft.com...
> > I checked all the log files and there are no entries at all for those
> items. It seems to be only happening when you setup subscriptions to send
> when content is refreshed.
> >
> > "Daniel Reib [MSFT]" wrote:
> >
> > > Do you see anything in the log files indicating a failure?
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote
> in
> > > message news:3F1EAEF9-4902-4C10-B3A7-370E00E92750@.microsoft.com...
> > > > Hi folks,
> > > >
> > > > I installed SP1 onto our development box in hope this would fix an
> issue
> > > with Email subscriptions failing on occasion to send. The problem is
> that
> > > random subscriptions are not firing after the report content is update
> and
> > > notification is not sent to the subscribers.
> > > >
> > > > After installing SP1 on our dev boxes it appears to happen less often
> but
> > > still occasionally loosing one of the 9 email subscriptions i'm sending
> to
> > > myself. When i check the report the content of the snapshot was
> refreshed
> > > but the last run date for the subscription is for the previous day.
> > > >
> > > > Any ideas?
> > >
> > >
> > >
>
>

Wednesday, March 21, 2012

Email Sub delivery failure

I have been trying to get email delivery of reports working for the best part
of 2 days now... I have learnt a lot about connections, encrypted files,
rsconfig etc, but I still can not get the thing to work.
I have ended up with the orginial problem I had, "Failure sending mail: The
Report Server has encountered a configuration error; more details in the log
files"
I have applied SP1 and now changed the account that the service uses to one
that had domain admin rights.
I am still can not see what else is left... every account that I know about
within RS has admin rights...
The following is an excerpt from the log...
Any ideas would be greatfully accepted... I dont really want to reinstall
but if that is what it takes ...
--
Thanks
Chris
ReportingServicesService!dbpolling!c24!13/02/2005-11:53:03:: EventPolling
processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:03:: EventPolling
processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
897832a6-9489-478d-8e75-97b1b64a2b5d executed at 13/02/2005 11:53:04.
ReportingServicesService!schedule!1c8!13/02/2005-11:53:04:: Creating Time
based subscription notification for subscription:
ef711679-d57d-4aba-b06b-47aafc18e808
ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
897832a6-9489-478d-8e75-97b1b64a2b5d execution completed at 13/02/2005
11:53:04.
ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04:: EventPolling
finished processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04::
NotificationPolling processing item c6a2efa0-ecac-40b9-b2c9-18610a52d62c
ReportingServicesService!dbpolling!c24!13/02/2005-11:53:04::
NotificationPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!library!1c8!02/13/2005-11:53:06:: i INFO:
Initializing EnableIntegratedSecurity to 'True' as specified in Server
system properties.
ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO: Call to
RenderFirst( '/Report Project2/Study Progress Report' )
ReportingServicesService!library!1c8!02/13/2005-11:53:11:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files, AuthzInitializeContextFromSid: Win32 error: 1355;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files
ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!emailextension!1c8!02/13/2005-11:53:12:: Error
sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
The Report Server has encountered a configuration error; more details in the
log files -->
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files
at
Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
userName)
at
Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
userName, IntPtr userToken)
at
Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
catItemType, Byte[] secDesc, ReportOperation rptOper)
at
Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32&
executionOption, String& savedParametersXml, ReportSnapshot&
compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
historyDate)
at
Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
report, String historyID, Boolean forRendering, NameValueCollection values,
DatasourceCredentialsCollection credentials)
at
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters)
at
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
-- End of inner exception stack trace --
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.ReportImpl.Render(String
renderFormat, String deviceInfo)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
ReportingServicesService!notification!1c8!02/13/2005-11:53:12:: Notification
c6a2efa0-ecac-40b9-b2c9-18610a52d62c completed. Success: False, Status:
Failure sending mail: The Report Server has encountered a configuration
error; more details in the log files, DeliveryExtension: Report Server Email,
Report: Study Progress Report, Attempt 0
ReportingServicesService!dbpolling!1c8!02/13/2005-11:53:12::
NotificationPolling finished processing item
c6a2efa0-ecac-40b9-b2c9-18610a52d62cChris,
I'm having the same issue. Your log file is getting the WinNT error 1355,
and
there is currently a hotfix available for it (834859) I haven't tried it yet,
but someone did at the following url and it worked for them.
http://groups-beta.google.com/group/microsoft.public.sqlserver.reportingsvcs/msg/123eea5b7fc5edaa?q=authz+group:microsoft.public.sqlserver.reportingsvcs&hl=en&lr=&ie=UTF-8&rnum=4
"Chris Morgan" wrote:
> I have been trying to get email delivery of reports working for the best part
> of 2 days now... I have learnt a lot about connections, encrypted files,
> rsconfig etc, but I still can not get the thing to work.
> I have ended up with the orginial problem I had, "Failure sending mail: The
> Report Server has encountered a configuration error; more details in the log
> files"
> I have applied SP1 and now changed the account that the service uses to one
> that had domain admin rights.
> I am still can not see what else is left... every account that I know about
> within RS has admin rights...
> The following is an excerpt from the log...
> Any ideas would be greatfully accepted... I dont really want to reinstall
> but if that is what it takes ...
> --
> Thanks
> Chris
>
> ReportingServicesService!dbpolling!c24!13/02/2005-11:53:03:: EventPolling
> processing 1 more items. 1 Total items in internal queue.
> ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:03:: EventPolling
> processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
> ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
> 897832a6-9489-478d-8e75-97b1b64a2b5d executed at 13/02/2005 11:53:04.
> ReportingServicesService!schedule!1c8!13/02/2005-11:53:04:: Creating Time
> based subscription notification for subscription:
> ef711679-d57d-4aba-b06b-47aafc18e808
> ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
> 897832a6-9489-478d-8e75-97b1b64a2b5d execution completed at 13/02/2005
> 11:53:04.
> ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04:: EventPolling
> finished processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
> ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04::
> NotificationPolling processing item c6a2efa0-ecac-40b9-b2c9-18610a52d62c
> ReportingServicesService!dbpolling!c24!13/02/2005-11:53:04::
> NotificationPolling processing 1 more items. 1 Total items in internal queue.
> ReportingServicesService!library!1c8!02/13/2005-11:53:06:: i INFO:
> Initializing EnableIntegratedSecurity to 'True' as specified in Server
> system properties.
> ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO: Call to
> RenderFirst( '/Report Project2/Study Progress Report' )
> ReportingServicesService!library!1c8!02/13/2005-11:53:11:: e ERROR: Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in the
> log files, AuthzInitializeContextFromSid: Win32 error: 1355;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in the
> log files
> ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server system
> properties.
> ReportingServicesService!emailextension!1c8!02/13/2005-11:53:12:: Error
> sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
> The Report Server has encountered a configuration error; more details in the
> log files -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in the
> log files
> at
> Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
> at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
> userName)
> at
> Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
> userName, IntPtr userToken)
> at
> Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
> userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
> at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
> catItemType, Byte[] secDesc, ReportOperation rptOper)
> at
> Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
> reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32&
> executionOption, String& savedParametersXml, ReportSnapshot&
> compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
> historyDate)
> at
> Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
> report, String historyID, Boolean forRendering, NameValueCollection values,
> DatasourceCredentialsCollection credentials)
> at
> Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
> reportContext, ClientRequest session, Warning[]& warnings,
> ParameterInfoCollection& effectiveParameters)
> at
> Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
> reportContext, ClientRequest session, Warning[]& warnings,
> ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
> at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
> at
> Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> -- End of inner exception stack trace --
> at
> Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> at
> Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
> rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
> type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
> String[]& secondaryStreamNames)
> at Microsoft.ReportingServices.Library.ReportImpl.Render(String
> renderFormat, String deviceInfo)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
> ReportingServicesService!notification!1c8!02/13/2005-11:53:12:: Notification
> c6a2efa0-ecac-40b9-b2c9-18610a52d62c completed. Success: False, Status:
> Failure sending mail: The Report Server has encountered a configuration
> error; more details in the log files, DeliveryExtension: Report Server Email,
> Report: Study Progress Report, Attempt 0
> ReportingServicesService!dbpolling!1c8!02/13/2005-11:53:12::
> NotificationPolling finished processing item
> c6a2efa0-ecac-40b9-b2c9-18610a52d62c
>|||David,
I did what I did not want to do in the end... reinstalled and used the
domain admin account from the outset, it guess what it works...
I wouldnt say that I fixed the problem, just hit it with a big enough
hammer...
What I can say is that our users are really amazed at what we can do now and
all the effort we have put into getting RS working was well worth it...
Thanks for the link...
Chris
"David Siebert" wrote:
> Chris,
> I'm having the same issue. Your log file is getting the WinNT error 1355,
> and
> there is currently a hotfix available for it (834859) I haven't tried it yet,
> but someone did at the following url and it worked for them.
>
> http://groups-beta.google.com/group/microsoft.public.sqlserver.reportingsvcs/msg/123eea5b7fc5edaa?q=authz+group:microsoft.public.sqlserver.reportingsvcs&hl=en&lr=&ie=UTF-8&rnum=4
>
> "Chris Morgan" wrote:
> > I have been trying to get email delivery of reports working for the best part
> > of 2 days now... I have learnt a lot about connections, encrypted files,
> > rsconfig etc, but I still can not get the thing to work.
> >
> > I have ended up with the orginial problem I had, "Failure sending mail: The
> > Report Server has encountered a configuration error; more details in the log
> > files"
> >
> > I have applied SP1 and now changed the account that the service uses to one
> > that had domain admin rights.
> >
> > I am still can not see what else is left... every account that I know about
> > within RS has admin rights...
> >
> > The following is an excerpt from the log...
> >
> > Any ideas would be greatfully accepted... I dont really want to reinstall
> > but if that is what it takes ...
> >
> > --
> > Thanks
> > Chris
> >
> >
> > ReportingServicesService!dbpolling!c24!13/02/2005-11:53:03:: EventPolling
> > processing 1 more items. 1 Total items in internal queue.
> > ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:03:: EventPolling
> > processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
> > ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
> > 897832a6-9489-478d-8e75-97b1b64a2b5d executed at 13/02/2005 11:53:04.
> > ReportingServicesService!schedule!1c8!13/02/2005-11:53:04:: Creating Time
> > based subscription notification for subscription:
> > ef711679-d57d-4aba-b06b-47aafc18e808
> > ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
> > 897832a6-9489-478d-8e75-97b1b64a2b5d execution completed at 13/02/2005
> > 11:53:04.
> > ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04:: EventPolling
> > finished processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
> > ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04::
> > NotificationPolling processing item c6a2efa0-ecac-40b9-b2c9-18610a52d62c
> > ReportingServicesService!dbpolling!c24!13/02/2005-11:53:04::
> > NotificationPolling processing 1 more items. 1 Total items in internal queue.
> > ReportingServicesService!library!1c8!02/13/2005-11:53:06:: i INFO:
> > Initializing EnableIntegratedSecurity to 'True' as specified in Server
> > system properties.
> > ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO: Call to
> > RenderFirst( '/Report Project2/Study Progress Report' )
> > ReportingServicesService!library!1c8!02/13/2005-11:53:11:: e ERROR: Throwing
> > Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> > The Report Server has encountered a configuration error; more details in the
> > log files, AuthzInitializeContextFromSid: Win32 error: 1355;
> > Info:
> > Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> > The Report Server has encountered a configuration error; more details in the
> > log files
> > ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO:
> > Initializing EnableExecutionLogging to 'True' as specified in Server system
> > properties.
> > ReportingServicesService!emailextension!1c8!02/13/2005-11:53:12:: Error
> > sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
> > The Report Server has encountered a configuration error; more details in the
> > log files -->
> > Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> > The Report Server has encountered a configuration error; more details in the
> > log files
> > at
> > Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
> > at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
> > userName)
> > at
> > Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
> > userName, IntPtr userToken)
> > at
> > Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
> > userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
> > at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
> > catItemType, Byte[] secDesc, ReportOperation rptOper)
> > at
> > Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
> > reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32&
> > executionOption, String& savedParametersXml, ReportSnapshot&
> > compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
> > historyDate)
> > at
> > Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
> > report, String historyID, Boolean forRendering, NameValueCollection values,
> > DatasourceCredentialsCollection credentials)
> > at
> > Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
> > reportContext, ClientRequest session, Warning[]& warnings,
> > ParameterInfoCollection& effectiveParameters)
> > at
> > Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
> > reportContext, ClientRequest session, Warning[]& warnings,
> > ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
> > at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
> > at
> > Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> > -- End of inner exception stack trace --
> > at
> > Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> > at
> > Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
> > rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
> > type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
> > String[]& secondaryStreamNames)
> > at Microsoft.ReportingServices.Library.ReportImpl.Render(String
> > renderFormat, String deviceInfo)
> > at
> > Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
> > at
> > Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
> > at
> > Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
> > ReportingServicesService!notification!1c8!02/13/2005-11:53:12:: Notification
> > c6a2efa0-ecac-40b9-b2c9-18610a52d62c completed. Success: False, Status:
> > Failure sending mail: The Report Server has encountered a configuration
> > error; more details in the log files, DeliveryExtension: Report Server Email,
> > Report: Study Progress Report, Attempt 0
> > ReportingServicesService!dbpolling!1c8!02/13/2005-11:53:12::
> > NotificationPolling finished processing item
> > c6a2efa0-ecac-40b9-b2c9-18610a52d62c
> >|||Just as a word of warning, my first attempt at a solution was to reinstall
RS. The mail worked for a little while, and then I began receiving the same
error again. So, just be on the lookout for failing email subscriptions.
While we haven't installed the hotfix, we've resorted to just sending a link
in the email. The error only occurs when you try to embed or attach a
report. Good luck.
"Chris Morgan" wrote:
> David,
> I did what I did not want to do in the end... reinstalled and used the
> domain admin account from the outset, it guess what it works...
> I wouldnt say that I fixed the problem, just hit it with a big enough
> hammer...
> What I can say is that our users are really amazed at what we can do now and
> all the effort we have put into getting RS working was well worth it...
> Thanks for the link...
> Chris
>
> "David Siebert" wrote:
> > Chris,
> >
> > I'm having the same issue. Your log file is getting the WinNT error 1355,
> > and
> > there is currently a hotfix available for it (834859) I haven't tried it yet,
> > but someone did at the following url and it worked for them.
> >
> >
> > http://groups-beta.google.com/group/microsoft.public.sqlserver.reportingsvcs/msg/123eea5b7fc5edaa?q=authz+group:microsoft.public.sqlserver.reportingsvcs&hl=en&lr=&ie=UTF-8&rnum=4
> >
> >
> > "Chris Morgan" wrote:
> >
> > > I have been trying to get email delivery of reports working for the best part
> > > of 2 days now... I have learnt a lot about connections, encrypted files,
> > > rsconfig etc, but I still can not get the thing to work.
> > >
> > > I have ended up with the orginial problem I had, "Failure sending mail: The
> > > Report Server has encountered a configuration error; more details in the log
> > > files"
> > >
> > > I have applied SP1 and now changed the account that the service uses to one
> > > that had domain admin rights.
> > >
> > > I am still can not see what else is left... every account that I know about
> > > within RS has admin rights...
> > >
> > > The following is an excerpt from the log...
> > >
> > > Any ideas would be greatfully accepted... I dont really want to reinstall
> > > but if that is what it takes ...
> > >
> > > --
> > > Thanks
> > > Chris
> > >
> > >
> > > ReportingServicesService!dbpolling!c24!13/02/2005-11:53:03:: EventPolling
> > > processing 1 more items. 1 Total items in internal queue.
> > > ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:03:: EventPolling
> > > processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
> > > ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
> > > 897832a6-9489-478d-8e75-97b1b64a2b5d executed at 13/02/2005 11:53:04.
> > > ReportingServicesService!schedule!1c8!13/02/2005-11:53:04:: Creating Time
> > > based subscription notification for subscription:
> > > ef711679-d57d-4aba-b06b-47aafc18e808
> > > ReportingServicesService!library!1c8!13/02/2005-11:53:04:: Schedule
> > > 897832a6-9489-478d-8e75-97b1b64a2b5d execution completed at 13/02/2005
> > > 11:53:04.
> > > ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04:: EventPolling
> > > finished processing item d4b31a3b-7752-49ed-ae30-36035bbd89c5
> > > ReportingServicesService!dbpolling!1c8!13/02/2005-11:53:04::
> > > NotificationPolling processing item c6a2efa0-ecac-40b9-b2c9-18610a52d62c
> > > ReportingServicesService!dbpolling!c24!13/02/2005-11:53:04::
> > > NotificationPolling processing 1 more items. 1 Total items in internal queue.
> > > ReportingServicesService!library!1c8!02/13/2005-11:53:06:: i INFO:
> > > Initializing EnableIntegratedSecurity to 'True' as specified in Server
> > > system properties.
> > > ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO: Call to
> > > RenderFirst( '/Report Project2/Study Progress Report' )
> > > ReportingServicesService!library!1c8!02/13/2005-11:53:11:: e ERROR: Throwing
> > > Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> > > The Report Server has encountered a configuration error; more details in the
> > > log files, AuthzInitializeContextFromSid: Win32 error: 1355;
> > > Info:
> > > Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> > > The Report Server has encountered a configuration error; more details in the
> > > log files
> > > ReportingServicesService!library!1c8!02/13/2005-11:53:11:: i INFO:
> > > Initializing EnableExecutionLogging to 'True' as specified in Server system
> > > properties.
> > > ReportingServicesService!emailextension!1c8!02/13/2005-11:53:12:: Error
> > > sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
> > > The Report Server has encountered a configuration error; more details in the
> > > log files -->
> > > Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> > > The Report Server has encountered a configuration error; more details in the
> > > log files
> > > at
> > > Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
> > > at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
> > > userName)
> > > at
> > > Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
> > > userName, IntPtr userToken)
> > > at
> > > Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
> > > userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
> > > at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
> > > catItemType, Byte[] secDesc, ReportOperation rptOper)
> > > at
> > > Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
> > > reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32&
> > > executionOption, String& savedParametersXml, ReportSnapshot&
> > > compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
> > > historyDate)
> > > at
> > > Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
> > > report, String historyID, Boolean forRendering, NameValueCollection values,
> > > DatasourceCredentialsCollection credentials)
> > > at
> > > Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
> > > reportContext, ClientRequest session, Warning[]& warnings,
> > > ParameterInfoCollection& effectiveParameters)
> > > at
> > > Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
> > > reportContext, ClientRequest session, Warning[]& warnings,
> > > ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
> > > at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
> > > at
> > > Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> > > -- End of inner exception stack trace --
> > > at
> > > Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> > > at
> > > Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
> > > rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
> > > type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
> > > String[]& secondaryStreamNames)
> > > at Microsoft.ReportingServices.Library.ReportImpl.Render(String
> > > renderFormat, String deviceInfo)
> > > at
> > > Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
> > > at
> > > Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
> > > at
> > > Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
> > > ReportingServicesService!notification!1c8!02/13/2005-11:53:12:: Notification
> > > c6a2efa0-ecac-40b9-b2c9-18610a52d62c completed. Success: False, Status:
> > > Failure sending mail: The Report Server has encountered a configuration
> > > error; more details in the log files, DeliveryExtension: Report Server Email,
> > > Report: Study Progress Report, Attempt 0
> > > ReportingServicesService!dbpolling!1c8!02/13/2005-11:53:12::
> > > NotificationPolling finished processing item
> > > c6a2efa0-ecac-40b9-b2c9-18610a52d62c
> > >

Sunday, March 11, 2012

E-mail failure in data driven subscriptions

When using a data driven subscription to generate and send a number or
reports to different addresses I have only been able to find a number that
were successful or failed. Is there any way to tell specifically which
e-mails from the group failed?The ReportServerService<timestamp>.log file will contain the information.
There is no UI around this information.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"bwray" <bwray@.discussions.microsoft.com> wrote in message
news:021B7E1F-76F7-4932-9448-7B79EF561763@.microsoft.com...
> When using a data driven subscription to generate and send a number or
> reports to different addresses I have only been able to find a number that
> were successful or failed. Is there any way to tell specifically which
> e-mails from the group failed?|||Thanks. That helped to some degree. I still can't find which indivdual
e-mail within the batch failed. I set up a controlled report scenario in
which I knew two of the e-mails would fail. However, the indivdual entrees
in the execution log all had a 'rssuccess' status for the report. The 'last
run status' in the schedule table shows '2 of 3 comlete with 2 errors'. I
know which ones failed, I just can't seem to pinpoint them within the logs.
Am I on the right track or am I looking in the wrong place? Thanks.
"Daniel Reib [MSFT]" wrote:
> The ReportServerService<timestamp>.log file will contain the information.
> There is no UI around this information.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "bwray" <bwray@.discussions.microsoft.com> wrote in message
> news:021B7E1F-76F7-4932-9448-7B79EF561763@.microsoft.com...
> > When using a data driven subscription to generate and send a number or
> > reports to different addresses I have only been able to find a number that
> > were successful or failed. Is there any way to tell specifically which
> > e-mails from the group failed?
>
>|||You should look in the log files for something like the following:
Notification <guid> completed. Success: True, Status: Mail sent to
<address>, DeliveryExtension: Report Server Email, Report: <report name>,
Attempt 0
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"bwray" <bwray@.discussions.microsoft.com> wrote in message
news:C99702B8-05E3-46FC-B7F5-A450289EF8DF@.microsoft.com...
> Thanks. That helped to some degree. I still can't find which indivdual
> e-mail within the batch failed. I set up a controlled report scenario in
> which I knew two of the e-mails would fail. However, the indivdual
> entrees
> in the execution log all had a 'rssuccess' status for the report. The
> 'last
> run status' in the schedule table shows '2 of 3 comlete with 2 errors'.
> I
> know which ones failed, I just can't seem to pinpoint them within the
> logs.
> Am I on the right track or am I looking in the wrong place? Thanks.
> "Daniel Reib [MSFT]" wrote:
>> The ReportServerService<timestamp>.log file will contain the information.
>> There is no UI around this information.
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "bwray" <bwray@.discussions.microsoft.com> wrote in message
>> news:021B7E1F-76F7-4932-9448-7B79EF561763@.microsoft.com...
>> > When using a data driven subscription to generate and send a number or
>> > reports to different addresses I have only been able to find a number
>> > that
>> > were successful or failed. Is there any way to tell specifically which
>> > e-mails from the group failed?
>>|||Thanks again. I think I'm getting closer to what I'm looking for but I'm
still not there. The 'To:' address for e-mails that fail is not available in
the log file. Now I can tell by recipient / time which ones were
successful. Now the problem is that if multiple copies of the same named
report go out in close proximity to each other (think invoices) I can't tell
which one fails.
"Daniel Reib [MSFT]" wrote:
> You should look in the log files for something like the following:
> Notification <guid> completed. Success: True, Status: Mail sent to
> <address>, DeliveryExtension: Report Server Email, Report: <report name>,
> Attempt 0
>
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "bwray" <bwray@.discussions.microsoft.com> wrote in message
> news:C99702B8-05E3-46FC-B7F5-A450289EF8DF@.microsoft.com...
> > Thanks. That helped to some degree. I still can't find which indivdual
> > e-mail within the batch failed. I set up a controlled report scenario in
> > which I knew two of the e-mails would fail. However, the indivdual
> > entrees
> > in the execution log all had a 'rssuccess' status for the report. The
> > 'last
> > run status' in the schedule table shows '2 of 3 comlete with 2 errors'.
> > I
> > know which ones failed, I just can't seem to pinpoint them within the
> > logs.
> > Am I on the right track or am I looking in the wrong place? Thanks.
> >
> > "Daniel Reib [MSFT]" wrote:
> >
> >> The ReportServerService<timestamp>.log file will contain the information.
> >> There is no UI around this information.
> >>
> >> --
> >> -Daniel
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "bwray" <bwray@.discussions.microsoft.com> wrote in message
> >> news:021B7E1F-76F7-4932-9448-7B79EF561763@.microsoft.com...
> >> > When using a data driven subscription to generate and send a number or
> >> > reports to different addresses I have only been able to find a number
> >> > that
> >> > were successful or failed. Is there any way to tell specifically which
> >> > e-mails from the group failed?
> >>
> >>
> >>
>
>|||I'm not sure what the issue might be. Each row from the DataDriven
subscription will create a new notification row. Each of these rows are
handled individually. I am not sure why you are not seeing the results.
You could send me the log file and I could take a look if you like. Just
remove the online from my address.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"bwray" <bwray@.discussions.microsoft.com> wrote in message
news:90179329-413F-425F-8D8F-FD97876F94FE@.microsoft.com...
> Thanks again. I think I'm getting closer to what I'm looking for but I'm
> still not there. The 'To:' address for e-mails that fail is not available
> in
> the log file. Now I can tell by recipient / time which ones were
> successful. Now the problem is that if multiple copies of the same named
> report go out in close proximity to each other (think invoices) I can't
> tell
> which one fails.
> "Daniel Reib [MSFT]" wrote:
>> You should look in the log files for something like the following:
>> Notification <guid> completed. Success: True, Status: Mail sent to
>> <address>, DeliveryExtension: Report Server Email, Report: <report name>,
>> Attempt 0
>>
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "bwray" <bwray@.discussions.microsoft.com> wrote in message
>> news:C99702B8-05E3-46FC-B7F5-A450289EF8DF@.microsoft.com...
>> > Thanks. That helped to some degree. I still can't find which indivdual
>> > e-mail within the batch failed. I set up a controlled report scenario
>> > in
>> > which I knew two of the e-mails would fail. However, the indivdual
>> > entrees
>> > in the execution log all had a 'rssuccess' status for the report. The
>> > 'last
>> > run status' in the schedule table shows '2 of 3 comlete with 2
>> > errors'.
>> > I
>> > know which ones failed, I just can't seem to pinpoint them within the
>> > logs.
>> > Am I on the right track or am I looking in the wrong place? Thanks.
>> >
>> > "Daniel Reib [MSFT]" wrote:
>> >
>> >> The ReportServerService<timestamp>.log file will contain the
>> >> information.
>> >> There is no UI around this information.
>> >>
>> >> --
>> >> -Daniel
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >>
>> >>
>> >> "bwray" <bwray@.discussions.microsoft.com> wrote in message
>> >> news:021B7E1F-76F7-4932-9448-7B79EF561763@.microsoft.com...
>> >> > When using a data driven subscription to generate and send a number
>> >> > or
>> >> > reports to different addresses I have only been able to find a
>> >> > number
>> >> > that
>> >> > were successful or failed. Is there any way to tell specifically
>> >> > which
>> >> > e-mails from the group failed?
>> >>
>> >>
>> >>
>>

Email delivery failure

Has anyone had issues with emails being delivered? The job runs successfully,
but the email does not get delivered. It seems to be related to the Reporting
Services server and not the email server. The reason I believe this is that,
after I reboot the Reporting Services server, the emails are successful. I
haven't been able to determine what causes the blockage on that server.Correction: Has anyone had issues with emails "not" being delievered?
"Rand" wrote:
> Has anyone had issues with emails being delivered? The job runs successfully,
> but the email does not get delivered. It seems to be related to the Reporting
> Services server and not the email server. The reason I believe this is that,
> after I reboot the Reporting Services server, the emails are successful. I
> haven't been able to determine what causes the blockage on that server.|||I am having the same exact issue. Any luck? Can you provide input on how you
resolved your issue, if you did?
"Rand" wrote:
> Correction: Has anyone had issues with emails "not" being delievered?
> "Rand" wrote:
> > Has anyone had issues with emails being delivered? The job runs successfully,
> > but the email does not get delivered. It seems to be related to the Reporting
> > Services server and not the email server. The reason I believe this is that,
> > after I reboot the Reporting Services server, the emails are successful. I
> > haven't been able to determine what causes the blockage on that server.

email alert on job failure

Hi all,
Is there a way to send an email alert when a sql server job fails?
Thanks in advance.Hi
If you are using SQL 2000 check the notifications tab on the job properties.
John
"helpful sql" wrote:

> Hi all,
> Is there a way to send an email alert when a sql server job fails?
> Thanks in advance.
>
>|||Hi
Add two additional steps. One is for success (OK) and another is for failure
(NO)
Job's step is going to the (OK) on success action and to (NO) on failure
action
"helpful sql" <nospam@.stopspam.com> wrote in message
news:%237ApnAMXGHA.1220@.TK2MSFTNGP02.phx.gbl...
> Hi all,
> Is there a way to send an email alert when a sql server job fails?
> Thanks in advance.
>|||This example job may help!
BEGIN TRANSACTION
DECLARE @.JobID BINARY(16)
DECLARE @.ReturnCode INT
SELECT @.ReturnCode = 0
IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name = N'Error
Handling') < 1
EXECUTE msdb.dbo.sp_add_category @.name = N'Error Handling'
-- Delete the job with the same name (if it exists)
SELECT @.JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N'Error Handling Example')
IF (@.JobID IS NOT NULL)
BEGIN
-- Check if the job is a multi-server job
IF (EXISTS (SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @.JobID) AND (server_id <> 0)))
BEGIN
-- There is, so abort the script
RAISERROR (N'Unable to import job ''Error Handling Example'' since there
is already a multi-server job with this name.', 16, 1)
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @.job_name = N'Error Handling Example'
SELECT @.JobID = NULL
END
BEGIN
-- Add the job
EXECUTE @.ReturnCode = msdb.dbo.sp_add_job @.job_id = @.JobID OUTPUT ,
@.job_name = N'Error Handling Example', @.owner_login_name = N'sa',
@.description = N'Error Handling Example.', @.category_name = N'Error
Handling', @.enabled = 0, @.notify_level_email = 0, @.notify_level_page = 0,
@.notify_level_netsend = 0, @.notify_level_eventlog = 2, @.delete_level= 0
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the job steps
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =
1, @.step_name = N'SQL DUMP', @.command = N'BACKUP DATABASE [MyDatabase] TO
DISK = N''C:\Backup\MyDatabase.bak'' WITH INIT , NOUNLOAD , NAME =
N''Database Backup'', NOSKIP , STATS = 10, NOFORMAT', @.database_name =
N'MyDatabase', @.server = N'', @.database_user_name = N'', @.subsystem =
N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts = 0,
@.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 2,
@.on_success_action = 4, @.on_fail_step_id = 3, @.on_fail_action = 4
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =
2, @.step_name = N'Inform Success', @.command = N'EXEC
master.dbo.xp_smtp_sendmail
@.FROM = N''MyAccount@.SQLServer'',
@.TO = N''MyAccount@.Home'',
@.subject = N''Success - Error Handler Job'',
@.message = N''Error Handler Test Succeeded'',
@.type = N''text/plain'',
@.server = N''MyRelay''
RAISERROR( ''Process Completed Successfully'' , 16,1)', @.database_name =
N'MyDatabase', @.server = N'', @.database_user_name = N'', @.subsystem =
N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts = 0,
@.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 0,
@.on_success_action = 1, @.on_fail_step_id = 0, @.on_fail_action = 1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =
3, @.step_name = N'Inform Failure', @.command = N'EXEC
master.dbo.xp_smtp_sendmail
@.FROM = N''MyAccount@.SQLServer'',
@.TO = N''MyAccount@.Home'',
@.subject = N''Failure - Error Handler Job'',
@.message = N''Error Handler Test Failed'',
@.type = N''text/plain'',
@.server = N''MyRelay''
RAISERROR( ''Process Failed see log ''' for details'' , 16,1)',
@.database_name = N'MyDatabase', @.server = N'', @.database_user_name = N'',
@.subsystem = N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts
= 0, @.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 0,
@.on_success_action = 2, @.on_fail_step_id = 0, @.on_fail_action = 2
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_update_job @.job_id = @.JobID,
@.start_step_id = 1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the job schedules
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobschedule @.job_id = @.JobID, @.name
= N'Error Handling Example', @.enabled = 1, @.freq_type = 4, @.active_start_dat
e
= 19900101, @.active_start_time = 214500, @.freq_interval = 1,
@.freq_subday_type = 1, @.freq_subday_interval = 0, @.freq_relative_interval =
0, @.freq_recurrence_factor = 0, @.active_end_date = 99991231, @.active_end_tim
e
= 235959
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the Target Servers
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobserver @.job_id = @.JobID,
@.server_name = N'(local)'
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@.@.TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
"Uri Dimant" wrote:

> Hi
> Add two additional steps. One is for success (OK) and another is for failu
re
> (NO)
> Job's step is going to the (OK) on success action and to (NO) on failure
> action
>
>
> "helpful sql" <nospam@.stopspam.com> wrote in message
> news:%237ApnAMXGHA.1220@.TK2MSFTNGP02.phx.gbl...
>
>

email alert on job failure

Hi all,
Is there a way to send an email alert when a sql server job fails?
Thanks in advance.Hi
If you are using SQL 2000 check the notifications tab on the job properties.
John
"helpful sql" wrote:
> Hi all,
> Is there a way to send an email alert when a sql server job fails?
> Thanks in advance.
>
>|||Hi
Add two additional steps. One is for success (OK) and another is for failure
(NO)
Job's step is going to the (OK) on success action and to (NO) on failure
action
"helpful sql" <nospam@.stopspam.com> wrote in message
news:%237ApnAMXGHA.1220@.TK2MSFTNGP02.phx.gbl...
> Hi all,
> Is there a way to send an email alert when a sql server job fails?
> Thanks in advance.
>|||This example job may help!
BEGIN TRANSACTION
DECLARE @.JobID BINARY(16)
DECLARE @.ReturnCode INT
SELECT @.ReturnCode = 0
IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name = N'Error
Handling') < 1
EXECUTE msdb.dbo.sp_add_category @.name = N'Error Handling'
-- Delete the job with the same name (if it exists)
SELECT @.JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N'Error Handling Example')
IF (@.JobID IS NOT NULL)
BEGIN
-- Check if the job is a multi-server job
IF (EXISTS (SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @.JobID) AND (server_id <> 0)))
BEGIN
-- There is, so abort the script
RAISERROR (N'Unable to import job ''Error Handling Example'' since there
is already a multi-server job with this name.', 16, 1)
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @.job_name = N'Error Handling Example'
SELECT @.JobID = NULL
END
BEGIN
-- Add the job
EXECUTE @.ReturnCode = msdb.dbo.sp_add_job @.job_id = @.JobID OUTPUT ,
@.job_name = N'Error Handling Example', @.owner_login_name = N'sa',
@.description = N'Error Handling Example.', @.category_name = N'Error
Handling', @.enabled = 0, @.notify_level_email = 0, @.notify_level_page = 0,
@.notify_level_netsend = 0, @.notify_level_eventlog = 2, @.delete_level= 0
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the job steps
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =1, @.step_name = N'SQL DUMP', @.command = N'BACKUP DATABASE [MyDatabase] TO
DISK = N''C:\Backup\MyDatabase.bak'' WITH INIT , NOUNLOAD , NAME =N''Database Backup'', NOSKIP , STATS = 10, NOFORMAT', @.database_name =N'MyDatabase', @.server = N'', @.database_user_name = N'', @.subsystem =N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts = 0,
@.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 2,
@.on_success_action = 4, @.on_fail_step_id = 3, @.on_fail_action = 4
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =2, @.step_name = N'Inform Success', @.command = N'EXEC
master.dbo.xp_smtp_sendmail
@.FROM = N''MyAccount@.SQLServer'',
@.TO = N''MyAccount@.Home'',
@.subject = N''Success - Error Handler Job'',
@.message = N''Error Handler Test Succeeded'',
@.type = N''text/plain'',
@.server = N''MyRelay''
RAISERROR( ''Process Completed Successfully'' , 16,1)', @.database_name =N'MyDatabase', @.server = N'', @.database_user_name = N'', @.subsystem =N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts = 0,
@.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 0,
@.on_success_action = 1, @.on_fail_step_id = 0, @.on_fail_action = 1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =3, @.step_name = N'Inform Failure', @.command = N'EXEC
master.dbo.xp_smtp_sendmail
@.FROM = N''MyAccount@.SQLServer'',
@.TO = N''MyAccount@.Home'',
@.subject = N''Failure - Error Handler Job'',
@.message = N''Error Handler Test Failed'',
@.type = N''text/plain'',
@.server = N''MyRelay''
RAISERROR( ''Process Failed see log ''' for details'' , 16,1)',
@.database_name = N'MyDatabase', @.server = N'', @.database_user_name = N'',
@.subsystem = N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts
= 0, @.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 0,
@.on_success_action = 2, @.on_fail_step_id = 0, @.on_fail_action = 2
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_update_job @.job_id = @.JobID,
@.start_step_id = 1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the job schedules
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobschedule @.job_id = @.JobID, @.name
= N'Error Handling Example', @.enabled = 1, @.freq_type = 4, @.active_start_date
= 19900101, @.active_start_time = 214500, @.freq_interval = 1,
@.freq_subday_type = 1, @.freq_subday_interval = 0, @.freq_relative_interval =0, @.freq_recurrence_factor = 0, @.active_end_date = 99991231, @.active_end_time
= 235959
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the Target Servers
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobserver @.job_id = @.JobID,
@.server_name = N'(local)'
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@.@.TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
"Uri Dimant" wrote:
> Hi
> Add two additional steps. One is for success (OK) and another is for failure
> (NO)
> Job's step is going to the (OK) on success action and to (NO) on failure
> action
>
>
> "helpful sql" <nospam@.stopspam.com> wrote in message
> news:%237ApnAMXGHA.1220@.TK2MSFTNGP02.phx.gbl...
> > Hi all,
> > Is there a way to send an email alert when a sql server job fails?
> >
> > Thanks in advance.
> >
>
>

email alert on job failure

Hi all,
Is there a way to send an email alert when a sql server job fails?
Thanks in advance.Hi
If you are using SQL 2000 check the notifications tab on the job properties.
John
"helpful sql" wrote:

> Hi all,
> Is there a way to send an email alert when a sql server job fails?
> Thanks in advance.
>
>|||Hi
Add two additional steps. One is for success (OK) and another is for failure
(NO)
Job's step is going to the (OK) on success action and to (NO) on failure
action
"helpful sql" <nospam@.stopspam.com> wrote in message
news:%237ApnAMXGHA.1220@.TK2MSFTNGP02.phx.gbl...
> Hi all,
> Is there a way to send an email alert when a sql server job fails?
> Thanks in advance.
>|||This example job may help!
BEGIN TRANSACTION
DECLARE @.JobID BINARY(16)
DECLARE @.ReturnCode INT
SELECT @.ReturnCode = 0
IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name = N'Error
Handling') < 1
EXECUTE msdb.dbo.sp_add_category @.name = N'Error Handling'
-- Delete the job with the same name (if it exists)
SELECT @.JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N'Error Handling Example')
IF (@.JobID IS NOT NULL)
BEGIN
-- Check if the job is a multi-server job
IF (EXISTS (SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @.JobID) AND (server_id <> 0)))
BEGIN
-- There is, so abort the script
RAISERROR (N'Unable to import job ''Error Handling Example'' since there
is already a multi-server job with this name.', 16, 1)
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @.job_name = N'Error Handling Example'
SELECT @.JobID = NULL
END
BEGIN
-- Add the job
EXECUTE @.ReturnCode = msdb.dbo.sp_add_job @.job_id = @.JobID OUTPUT ,
@.job_name = N'Error Handling Example', @.owner_login_name = N'sa',
@.description = N'Error Handling Example.', @.category_name = N'Error
Handling', @.enabled = 0, @.notify_level_email = 0, @.notify_level_page = 0,
@.notify_level_netsend = 0, @.notify_level_eventlog = 2, @.delete_level= 0
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the job steps
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =
1, @.step_name = N'SQL DUMP', @.command = N'BACKUP DATABASE [MyDatabase] T
O
DISK = N''C:\Backup\MyDatabase.bak'' WITH INIT , NOUNLOAD , NAME =
N''Database Backup'', NOSKIP , STATS = 10, NOFORMAT', @.database_name =
N'MyDatabase', @.server = N'', @.database_user_name = N'', @.subsystem =
N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts = 0,
@.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 2,
@.on_success_action = 4, @.on_fail_step_id = 3, @.on_fail_action = 4
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =
2, @.step_name = N'Inform Success', @.command = N'EXEC
master.dbo.xp_smtp_sendmail
@.FROM = N''MyAccount@.SQLServer'',
@.TO = N''MyAccount@.Home'',
@.subject = N''Success - Error Handler Job'',
@.message = N''Error Handler Test Succeeded'',
@.type = N''text/plain'',
@.server = N''MyRelay''
RAISERROR( ''Process Completed Successfully'' , 16,1)', @.database_name =
N'MyDatabase', @.server = N'', @.database_user_name = N'', @.subsystem =
N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts = 0,
@.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 0,
@.on_success_action = 1, @.on_fail_step_id = 0, @.on_fail_action = 1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id = @.JobID, @.step_id =
3, @.step_name = N'Inform Failure', @.command = N'EXEC
master.dbo.xp_smtp_sendmail
@.FROM = N''MyAccount@.SQLServer'',
@.TO = N''MyAccount@.Home'',
@.subject = N''Failure - Error Handler Job'',
@.message = N''Error Handler Test Failed'',
@.type = N''text/plain'',
@.server = N''MyRelay''
RAISERROR( ''Process Failed see log ''' for details'' , 16,1)',
@.database_name = N'MyDatabase', @.server = N'', @.database_user_name = N'',
@.subsystem = N'TSQL', @.cmdexec_success_code = 0, @.flags = 6, @.retry_attempts
= 0, @.retry_interval = 1, @.output_file_name = N'', @.on_success_step_id = 0,
@.on_success_action = 2, @.on_fail_step_id = 0, @.on_fail_action = 2
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXECUTE @.ReturnCode = msdb.dbo.sp_update_job @.job_id = @.JobID,
@.start_step_id = 1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the job schedules
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobschedule @.job_id = @.JobID, @.name
= N'Error Handling Example', @.enabled = 1, @.freq_type = 4, @.active_start_dat
e
= 19900101, @.active_start_time = 214500, @.freq_interval = 1,
@.freq_subday_type = 1, @.freq_subday_interval = 0, @.freq_relative_interval =
0, @.freq_recurrence_factor = 0, @.active_end_date = 99991231, @.active_end_tim
e
= 235959
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
-- Add the Target Servers
EXECUTE @.ReturnCode = msdb.dbo.sp_add_jobserver @.job_id = @.JobID,
@.server_name = N'(local)'
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@.@.TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
"Uri Dimant" wrote:

> Hi
> Add two additional steps. One is for success (OK) and another is for failu
re
> (NO)
> Job's step is going to the (OK) on success action and to (NO) on failure
> action
>
>
> "helpful sql" <nospam@.stopspam.com> wrote in message
> news:%237ApnAMXGHA.1220@.TK2MSFTNGP02.phx.gbl...
>
>