Skip to main content

Posts

Showing posts from September, 2011

Email Alerts are not received...

In one of application, Email alerts are sent using SQL sp_send_dbmail stored procedure. Email alerts were working properly, but suddenly noticed email alerts are not received.

To troubleshoot the issue, first I checked the msdb.dbo.sysmail_event_log table using the below query.

SELECT log_id, event_type, log_date, description, process_id, mailitem_id, account_id, last_mod_date, last_mod_user
FROM
msdb.dbo.sysmail_event_log 
ORDER BY
log_date DESC

If there is any error, you should see records with the event_type value as error.
In my case there are records with event_type value as error, and the description value for those records is same as below

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2018-02-01T10:41:27). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required).  )

As per the error descript…

Advanced MDX Ranking

There was a situation that I want to get the Rank value considering three dimension levels. In one of earlier post (MDX Rank post), I mentioned how to get the rank value for two dimension levels.This post will shows the MDX query to get the rank value for three dimension levels.
Lets consider a scenario that we want to get the Rank value of a department considering the stores of a particular region. Below MDX query will give the required rank value.
WITH MEMBER [Measures].[RankSales] AS RANK(([Store—Region_Store].CurrentMember,[Store—Region].CurrentMember,[Item—Department].CurrentMember), ORDER(({[Store—Region_Store].[Store].MEMBERS*[Store—Region].CurrentMember*[Item— Department ].CurrentMember}), [Measures].[Sales], BDESC))
SELECT {[Measures].[RankSales]} ON 0, {[Store—Store].[Store].MEMBERS*[Item— Department ].[ Department ].MEMBERS } ON 1 FROM [Sales] where {[Store—Region].[All Store—Region].[Region1]}*{[Item— Department_Sub ].[All Item— Department_Sub ].[ Department1 ]}
Likewise we can expand the q…

Non-Windows user credentials were supplied for a non-http connection to Analysis Services...

While trying to view a SSRS report in the report server outside from the server, I got the below error message.
Non-Windows user credentials were supplied for a non-http connection to Analysis Services. The Microsoft SQL Server Analysis Services data extension requires Windows Integrated Security unless connecting via http or https.

This because when we access the data source which use for the report from outside, it cannot connect to the cube due to the user permission issue.

When we want to provide access for non domain users to the report, we provide credentials of an authorized user for the data source. Go to the Data Source folder in the report server and then click on the relevant data source. Then you will get set of properties and in that you can see Connect using: property. In that select Credentials stored securely in the report server option and provide a valid user name and password. But if you click Apply button by just providing that user name and password, when you are g…

Case Sensitivity with SSRS Grouping ?

When I created a SSRS report to retrieve SSAS cube data, I found that the dimension members which contains same name but has different case, has been missing. As an example if you have two dimension members of Item dimension as item1 and Item1, then only one will be shown.The reason was that it does not support case sensitivity with grouping.
To have the case sensitivity in the report I had to do two changes. One is in the cube level and the other one is in the report data set level.
At the dimension level you have to allow case sensitive. To do that open the dimension in the dimension editor using BIDS, the select the dimension and view the properties. At the top of the Properties window you will find the Collation property. Click on the button and put a tick in front of Case Sensitive value. Then process the dimension and then process the cube.
Even though you change this, you will not get the expected result in the report. To get it, select the Dataset in the Report Data tab and doubl…

MDX Rank

Normally we use MDX Rank function to get the rank value considering just one dimension level. But I face an situation that Rank value needed to be taken considering two dimension levels. As an example needed to get the Rank of Sales value of stores, which related to a Region. I was unable to find a direct solution and after doing some researches I was able to build the MDX query. The query is given below.
WITH MEMBER [Measures].[Rank] AS RANK(([Store—Region].CurrentMember,[Store—Region_Store].CurrentMember), ORDER(({[Store—Region_Store].[Store].MEMBERS*[Store—Region].CurrentMember}), [Measures].[Sales], BDESC)) SELECT {[Measures].[Rank], [Measures].[Sales]} ON 0, {[Store—Region_Store].[Store].MEMBERS} ON 1 FROM [Sales] where {[Store—Region].[All Store—Region].[Region1]}
If we give the region value as Region1, then what this query does is it rank only the stores which are related to the Region1 region. If the Region1 region contains 5 stores, the highest rank value …