Showing posts with label due. Show all posts
Showing posts with label due. Show all posts

Tuesday, March 20, 2012

Alert a user from SQL Sever Trigger

Hi
We are trying to alert a user from a trigger in SQL Server.
We are currently using a Trigger to produce an email to the user, which is
not ideal due to the quantity of times the alert will be raised during the
day.
Any suggestions would be ideal.
Thanks
BDon't send email from a trigger (see
http://www.google.co.uk/groups?&sel... />
groups.com)
Instead, schedule the notification process at regular intervals to poll
the required table (based on an updated datetime column for example)
and send notifications as required.
Consider using Notification Services:
http://www.microsoft.com/sql/ns/default.asp
David Portas
SQL Server MVP
--|||Ben
Yes , it is not ideal.
It hurts performance ,so you are going to change the logic to alter your
users.
Have you looked at Alerts under Management folder in EM?
"Ben" <Ben@.NoSpam.com> wrote in message
news:uKzBiUPOFHA.3076@.TK2MSFTNGP14.phx.gbl...
> Hi
> We are trying to alert a user from a trigger in SQL Server.
> We are currently using a Trigger to produce an email to the user, which is
> not ideal due to the quantity of times the alert will be raised during the
> day.
> Any suggestions would be ideal.
> Thanks
> B
>|||This kind of thing is exactly what notification services is for... It is
designed to scale huge, and it comes with SQL Server... Joe Webb has written
a nice coverage of notification services in a book published by Mann
Publishing.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ben" <Ben@.NoSpam.com> wrote in message
news:uKzBiUPOFHA.3076@.TK2MSFTNGP14.phx.gbl...
> Hi
> We are trying to alert a user from a trigger in SQL Server.
> We are currently using a Trigger to produce an email to the user, which is
> not ideal due to the quantity of times the alert will be raised during the
> day.
> Any suggestions would be ideal.
> Thanks
> B
>|||Hi David & Uri
I agree that we should not send emails in Triggers.
As this is for a single user I believe that the Notification Services may
cost too much.
Is it possible to use windows messaging?
Thanks
B
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:efxBacPOFHA.2748@.TK2MSFTNGP09.phx.gbl...
> Ben
> Yes , it is not ideal.
> It hurts performance ,so you are going to change the logic to alter your
> users.
> Have you looked at Alerts under Management folder in EM?
>
> "Ben" <Ben@.NoSpam.com> wrote in message
> news:uKzBiUPOFHA.3076@.TK2MSFTNGP14.phx.gbl...
>|||Apologies everyone I did not realise Notification Services was part of SQL
Server.
I will look into it, it seems that it could solve three other problems that
I have too!
Many thanks for your posts
B
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:O2TKQMROFHA.2728@.TK2MSFTNGP15.phx.gbl...
> This kind of thing is exactly what notification services is for... It is
> designed to scale huge, and it comes with SQL Server... Joe Webb has
> written a nice coverage of notification services in a book published by
> Mann Publishing.
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ben" <Ben@.NoSpam.com> wrote in message
> news:uKzBiUPOFHA.3076@.TK2MSFTNGP14.phx.gbl...
>|||There is no purchase cost for Notification Services itself but you do
need to be able to comply with the licensing requirements. (see "How to
Obtain" under the link posted previously)
If NS doesn't suit you then I recommend xp_smtp_sendmail. Very easy to
setup and configure. See the following for more info:
http://www.aspfaq.com/show.asp?id=2403
David Portas
SQL Server MVP
--

Friday, February 24, 2012

agent entries in registry missing after restore

Hi,
We had to back-up and restore a server due to an error
during installation regarding disk partitioning.
The server is completely restored where rights to files
have been restred and all files are in the same location
(MS Back-up). Everything seems to be working fine, except
for MS SQL server.
No MS SQL servers are available to log-on to.
Event messages 322, 19011, 208, 203, 17177 etc. appear
sample of event 322:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: (4)
Event ID: 322
Date: 1/22/2004
Time: 12:50:14 PM
User: N/A
Computer: BLUE
Description:
The description for Event ID ( 322 ) in Source (
SQLSERVERAGENT ) cannot be found. The local computer may
not have the necessary registry information or message DLL
files to display messages from a remote computer. The
following information is part of the event: 19002,
MSSQLSERVER.
---
So the question is: he registry seems to be restored
properly, but somehow SQL server entries are not found. I
did not take a copy of the registry. Prior to deleting it.
Am I suffering a rights problem or a registry restore
problem?
Any ideas are very much appreciated!
Thanks,
SamYou can try to rebuild the registry entries, if this is the problem. When
you start the SQL Server Setup, you will find a
Rebuild Registry Option in the Advanced Setup Options.
Cheers,
Herbert
"Sam Jaarsma" <sam@.grupoamengual.com.nospam> schrieb im Newsbeitrag
news:2bb101c3e191$e3a27c10$a001280a@.phx.gbl...
quote:

> Hi,
> We had to back-up and restore a server due to an error
> during installation regarding disk partitioning.
> The server is completely restored where rights to files
> have been restred and all files are in the same location
> (MS Back-up). Everything seems to be working fine, except
> for MS SQL server.
> No MS SQL servers are available to log-on to.
> Event messages 322, 19011, 208, 203, 17177 etc. appear
> sample of event 322:
> Event Type: Error
> Event Source: SQLSERVERAGENT
> Event Category: (4)
> Event ID: 322
> Date: 1/22/2004
> Time: 12:50:14 PM
> User: N/A
> Computer: BLUE
> Description:
> The description for Event ID ( 322 ) in Source (
> SQLSERVERAGENT ) cannot be found. The local computer may
> not have the necessary registry information or message DLL
> files to display messages from a remote computer. The
> following information is part of the event: 19002,
> MSSQLSERVER.
> ---
> So the question is: he registry seems to be restored
> properly, but somehow SQL server entries are not found. I
> did not take a copy of the registry. Prior to deleting it.
> Am I suffering a rights problem or a registry restore
> problem?
> Any ideas are very much appreciated!
> Thanks,
> Sam
>

agent entries in registry missing after restore

Hi,
We had to back-up and restore a server due to an error
during installation regarding disk partitioning.
The server is completely restored where rights to files
have been restred and all files are in the same location
(MS Back-up). Everything seems to be working fine, except
for MS SQL server.
No MS SQL servers are available to log-on to.
Event messages 322, 19011, 208, 203, 17177 etc. appear
sample of event 322:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: (4)
Event ID: 322
Date: 1/22/2004
Time: 12:50:14 PM
User: N/A
Computer: BLUE
Description:
The description for Event ID ( 322 ) in Source (
SQLSERVERAGENT ) cannot be found. The local computer may
not have the necessary registry information or message DLL
files to display messages from a remote computer. The
following information is part of the event: 19002,
MSSQLSERVER.
---
So the question is: he registry seems to be restored
properly, but somehow SQL server entries are not found. I
did not take a copy of the registry. Prior to deleting it.
Am I suffering a rights problem or a registry restore
problem?
Any ideas are very much appreciated!
Thanks,
SamYou can try to rebuild the registry entries, if this is the problem. When
you start the SQL Server Setup, you will find a
Rebuild Registry Option in the Advanced Setup Options.
Cheers,
Herbert
"Sam Jaarsma" <sam@.grupoamengual.com.nospam> schrieb im Newsbeitrag
news:2bb101c3e191$e3a27c10$a001280a@.phx.gbl...
> Hi,
> We had to back-up and restore a server due to an error
> during installation regarding disk partitioning.
> The server is completely restored where rights to files
> have been restred and all files are in the same location
> (MS Back-up). Everything seems to be working fine, except
> for MS SQL server.
> No MS SQL servers are available to log-on to.
> Event messages 322, 19011, 208, 203, 17177 etc. appear
> sample of event 322:
> Event Type: Error
> Event Source: SQLSERVERAGENT
> Event Category: (4)
> Event ID: 322
> Date: 1/22/2004
> Time: 12:50:14 PM
> User: N/A
> Computer: BLUE
> Description:
> The description for Event ID ( 322 ) in Source (
> SQLSERVERAGENT ) cannot be found. The local computer may
> not have the necessary registry information or message DLL
> files to display messages from a remote computer. The
> following information is part of the event: 19002,
> MSSQLSERVER.
> ---
> So the question is: he registry seems to be restored
> properly, but somehow SQL server entries are not found. I
> did not take a copy of the registry. Prior to deleting it.
> Am I suffering a rights problem or a registry restore
> problem?
> Any ideas are very much appreciated!
> Thanks,
> Sam
>

Again: eMail subscription

I got a clue what might be wrong on my server machines which do not allow
eMail subscription due to a "configuration error"
I have an XP machine here with a local SQL server and a local RS client and
server. If I look at the property page of a given report there is always
something like that (I have to translate it from german, so maybe it is a
bit different in english versions):
changed at: (datetime)
changed by: SPONGEBOB\roland
created at: (datetime)
created by: SPONGEBOB\roland
size: 8kb
SPONGEBOB is the name of the machine; roland the user account.
Whereas my server machines show up the following:
changed at: (datetime)
changed by: TACCO\Administrator (unknown)
created at: (datetime)
created by: TACCO\Administrator (unknown)
size: 8kb
TACCO is the server name; administrator the user account. My concern is the
"unknown", what exactly causes the problem with eMail subscription. What
does cause RS to print "unknown" there and how to come over it?
TIA
rolandHallo Roland,
ich hatte ein ähnliches Problem, nachdem ich das Konto unter dem der Dienst läuft geändert hatte, ich mu�te es in den Orginalzustand zurücksetzen dann gingen auch wieder die eMail Abbonements.
Hi Roland,
I had a similar problem, but after resetting the account of the servce back to the one I've used while installing, the email works!
hth
sequal
"Roland" wrote:
> I got a clue what might be wrong on my server machines which do not allow
> eMail subscription due to a "configuration error"
> I have an XP machine here with a local SQL server and a local RS client and
> server. If I look at the property page of a given report there is always
> something like that (I have to translate it from german, so maybe it is a
> bit different in english versions):
> changed at: (datetime)
> changed by: SPONGEBOB\roland
> created at: (datetime)
> created by: SPONGEBOB\roland
> size: 8kb
> SPONGEBOB is the name of the machine; roland the user account.
> Whereas my server machines show up the following:
> changed at: (datetime)
> changed by: TACCO\Administrator (unknown)
> created at: (datetime)
> created by: TACCO\Administrator (unknown)
> size: 8kb
> TACCO is the server name; administrator the user account. My concern is the
> "unknown", what exactly causes the problem with eMail subscription. What
> does cause RS to print "unknown" there and how to come over it?
> TIA
> roland
>
>|||Me again, let it run under: "NT AUTHORITY\NetworkService"
sequal
"Roland" wrote:
> I got a clue what might be wrong on my server machines which do not allow
> eMail subscription due to a "configuration error"
> I have an XP machine here with a local SQL server and a local RS client and
> server. If I look at the property page of a given report there is always
> something like that (I have to translate it from german, so maybe it is a
> bit different in english versions):
> changed at: (datetime)
> changed by: SPONGEBOB\roland
> created at: (datetime)
> created by: SPONGEBOB\roland
> size: 8kb
> SPONGEBOB is the name of the machine; roland the user account.
> Whereas my server machines show up the following:
> changed at: (datetime)
> changed by: TACCO\Administrator (unknown)
> created at: (datetime)
> created by: TACCO\Administrator (unknown)
> size: 8kb
> TACCO is the server name; administrator the user account. My concern is the
> "unknown", what exactly causes the problem with eMail subscription. What
> does cause RS to print "unknown" there and how to come over it?
> TIA
> roland
>
>|||Hallo sequal,
wir haben es sowohl unter System als auch unter NetworkServices installiert.
Leider hat bei uns zumindest nichts geholfen. Unsere Server gehören zu
keiner Domain, ist das bei Euch anders?
we tried to install RS under "NTAUTHORITY\System" as well as NetworkService.
Nothing did help. Our servers don't belong to a domain, is that different at
your side?
r.|||Hallo Roland,
checken Sie doch bitte mal Ihre LogFiles, \Programme\Microsoft SQL Server\MSSQL\Reporting Services\LogFiles. Ich hatte exact die selbe Fehlemeldung nachdem ich den User unter dem die RS laufen sollten geändert habe, die Daten in der RepServ DB werden verschlüsselt, und im Logfile finden Sie zur geplanten Laufzeit der e-Mailsubscribtion eine entsprechende Fehlermeldung.
Unsere System läuft in einem ActivDirectory (Domäne) ich hatte alles in einer Testumgebung aufgesetzt (keine Domäne) und dann ins Echtnetzwerk übertragen, als ich die User unter welchen solche Dienste bei uns in der Firma laufen nachgepflegt habe ging plötzlich die e-Mail Subs. nicht mehr, aber alles andere lief.
Grüsse s.
P.S.: Anbei ein Auszug aus meinem Logfile welches mir den HinweiÃ? gab:
ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO: Initializing crypto as user: NT-AUTORITÃ?T\SYSTEM
ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO: Exporting public key
ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO: Performing sku validation
ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO: Importing existing encryption key
ReportingServicesService!library!d18!25.05.2004-16:08:20:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDisabledException: Der Berichtsserver kann den symmetrischen Schlüssel nicht entschlüsseln, der zum Zugreifen auf geschützte oder verschlüsselte Daten in einer Berichtsserver-Datenbank verwendet wird. Sie müssen entweder einen Sicherungsschlüssel wiederherstellen oder den gesamten verschlüsselten Inhalt löschen und den Dienst dann neu starten. Weitere Informationen finden Sie in der Dokumentation., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDisabledException: Der Berichtsserver kann den symmetrischen Schlüssel nicht entschlüsseln, der zum Zugreifen auf geschützte oder verschlüsselte Daten in einer Berichtsserver-Datenbank verwendet wird. Sie müssen entweder einen Sicherungsschlüssel wiederherstellen oder den gesamten verschlüsselten Inhalt löschen und den Dienst dann neu starten. Weitere Informationen finden Sie in der Dokumentation. --> System.Runtime.InteropServices.COMException (0x80090005): Ungültige Daten
"Roland" wrote:
> Hallo sequal,
> wir haben es sowohl unter System als auch unter NetworkServices installiert.
> Leider hat bei uns zumindest nichts geholfen. Unsere Server gehören zu
> keiner Domain, ist das bei Euch anders?
> we tried to install RS under "NTAUTHORITY\System" as well as NetworkService.
> Nothing did help. Our servers don't belong to a domain, is that different at
> your side?
> r.
>
>|||Sequal,
Danke für Deine/Ihre Bemühungen.
In
news:ucIk$9uVEHA.1152@.TK2MSFTNGP09.phx.gbl
habe ich mal die Inhalte der Logdateien dargestellt. Irgendwie matchen die
nicht Deine/Ihre Logs :)
Grüsse und Vielen Dank
Roland
"sequal" <sequal@.discussions.microsoft.com> schrieb im Newsbeitrag
news:67196D21-20B2-4B62-A09A-32E9F7DEFEA7@.microsoft.com...
> Hallo Roland,
> checken Sie doch bitte mal Ihre LogFiles, \Programme\Microsoft SQL
Server\MSSQL\Reporting Services\LogFiles. Ich hatte exact die selbe
Fehlemeldung nachdem ich den User unter dem die RS laufen sollten geändert
habe, die Daten in der RepServ DB werden verschlüsselt, und im Logfile
finden Sie zur geplanten Laufzeit der e-Mailsubscribtion eine entsprechende
Fehlermeldung.
> Unsere System läuft in einem ActivDirectory (Domäne) ich hatte alles in
einer Testumgebung aufgesetzt (keine Domäne) und dann ins Echtnetzwerk
übertragen, als ich die User unter welchen solche Dienste bei uns in der
Firma laufen nachgepflegt habe ging plötzlich die e-Mail Subs. nicht mehr,
aber alles andere lief.
> Grüsse s.
> P.S.: Anbei ein Auszug aus meinem Logfile welches mir den Hinweiß gab:
> ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO:
Initializing crypto as user: NT-AUTORITÄT\SYSTEM
> ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO:
Exporting public key
> ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO:
Performing sku validation
> ReportingServicesService!crypto!d18!25.05.2004-16:08:20:: i INFO:
Importing existing encryption key
> ReportingServicesService!library!d18!25.05.2004-16:08:20:: e ERROR:
Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDisabledExcept
ion: Der Berichtsserver kann den symmetrischen Schlüssel nicht
entschlüsseln, der zum Zugreifen auf geschützte oder verschlüsselte Daten in
einer Berichtsserver-Datenbank verwendet wird. Sie müssen entweder einen
Sicherungsschlüssel wiederherstellen oder den gesamten verschlüsselten
Inhalt löschen und den Dienst dann neu starten. Weitere Informationen finden
Sie in der Dokumentation., ;
> Info:
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDisabledExcept
ion: Der Berichtsserver kann den symmetrischen Schlüssel nicht
entschlüsseln, der zum Zugreifen auf geschützte oder verschlüsselte Daten in
einer Berichtsserver-Datenbank verwendet wird. Sie müssen entweder einen
Sicherungsschlüssel wiederherstellen oder den gesamten verschlüsselten
Inhalt löschen und den Dienst dann neu starten. Weitere Informationen finden
Sie in der Dokumentation. --> System.Runtime.InteropServices.COMException
(0x80090005): Ungültige Daten
>
> "Roland" wrote:
> > Hallo sequal,
> >
> > wir haben es sowohl unter System als auch unter NetworkServices
installiert.
> > Leider hat bei uns zumindest nichts geholfen. Unsere Server gehören zu
> > keiner Domain, ist das bei Euch anders?
> >
> > we tried to install RS under "NTAUTHORITY\System" as well as
NetworkService.
> > Nothing did help. Our servers don't belong to a domain, is that
different at
> > your side?
> >
> > r.
> >
> >
> >