Showing posts with label triggered. Show all posts
Showing posts with label triggered. Show all posts

Thursday, March 22, 2012

Alert Not Being Triggered

Hi guys,

Hope you are all well.

I am trying to set up a 'SQL Server event alert' that will 'net send' a warning message to one of the Operators that have been set-up on our SQL Server.

The alert has been configured to act on severity level '009 - User Defined', for all databases.

I have created a user defined system message with a severity level '9' on the sysmessages table.

EXEC sp_addmessage 80000, 9, 'My User Defined Message'

...and I have raised this error on our SQL Server.

RAISERROR(80000, 9, 1) WITH LOG

The error message is being generated in the SQL Server Log file, but for some reason my Alert does not appear to fire off the 'net send' event.

The operator is 'available to receive notifications', and I have tested the 'net send' command successfully.

Does anyone know why this Alert might not be sending a message with the 'net send' command?

Thanks in advance,
KevinI found the 'problem'. There is a text box in the Alert properties labelled 'Error message contains this text'. I stupidly assumed that this would be the message displayed to the Operator, when in fact this actually restricts the alert to only those events that contain the text specified in the error message.

:o :D

Monday, March 19, 2012

Aggregete() function doesn't work for SQL query results!

Reporting Services translates null value into blank on SQL query results, but not on MDX query results. But Aggregate() functions is triggered only by null value.

So Aggregate() function only works for MDX query results, not for SQL query results.

MDX example:

select {[Measures].[Sales]} on columns,

{[Account].[Hierarchy].Members} on rows

FROM Cube

SQL example:

SELECT * FROM OPENQUERY(Linked_Cube, '
select {[Measures].[Sales]} on columns,

{[Account].[Hierarchy].Members} on rows

FROM Cube')

Now you build a report with a table, then add a grouping and use "=Aggregate(Fields!Sales.Value)" for the group level cell. If you bind MDX query to this table, then aggregates show up correctly. But if you bind SQL query to this table, there are no aggregates at all.

I need to use SQL query to drive my reports, because MDX query results need to be merged with results from other calculations.

How can I make Aggregate() function to work for SQL query results?

Thanks,

Bo Dong

bo_dong@.yahoo.com

How can I make it to work for SQL as well?

Please read my answer on your other thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=668524&SiteID=1

-- Robert