SQL Server Analysis Services Flight Recorder – how to check the change logs as a PRO

So you have assigned weekend DBA role and you need to take care about your company SQL servers as well. I will focus here on checking the change logs for the SQL server analysis services, it some other blog post we will pay attention to the SQL server database service as well.

The specific problem that I have is on the specific role for the database the cell data read permission were enabled. I was testing some third party app and the third party app was relying on this type of permissions, so of course if you do not assign appropriate permissions for the cell data the application would work and would return something like: “read access to the cell is denied“.

The error has lead me that the read permissions were enabled on the cell data level and the user is not able to read the data from particular place because cell data was not configured.

I have disabled enable read permissions for the cell data in the Role properties for a specific role, and of course the soon I did that the 3rd party application started working, I knew I need to add another property in order application to work.

What I didn’t know is what exactly was in that property before, so when I just ticked enable read permissions and saved the query and lost the query whatever was before. Okay so I have now enabled read permissions of all the content but I know I need to specify just specific content.

I need to know what was there before the save.

First you need to find the logs of the Analysis services which are located here: C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log (of course if your installation is in the different place you need to look there, but to find where are the logs go you can chenk in the Properties of the SQL Analysis server and then go to general tab

Then navigate to that location any you will see a files that looks something like this:

The key for us is the Flight recorder back, so it is like a ‘black-box’ trace of what has changed on the SQL server, or in this scenario of what has changed on the SQL Server analysis services. This is a great this because it will trace all the recent changes on the server, and if you deleted something accidentally you will be able to see what was there before (the settings not the actual data) and then to revert changes on the SQL server.

When you open the flight recorder file it will look something like this:

So inside this file is the trace of everything that you have recently changed on the SQL server. This is really powerful, if you deleted something or if you need to check the audit log or what happens on the query begin, on the query end or if you query subcube everything will be in one single location.

What I knew is I have changed Expression for the content, and basically I have lost it and this is how it looks like :-)

 

What you need to focus in the eventclass command begin and command end in my situation.

There is it, after a change I had expression that was there before

So from this screenshot we can clearly see that the change was on the roleID with a ID 3, and the I have ticked the checkbox Allowed (in the SQL management studio it is called enabled read permissions on the cell data page) and that the expression was the below. BINGO!

So this change was just before I deleted the whole expression and I am easily able to extract query for the SQL server studio and paste it again on the server.

SQL Server Analysis Services Flight Recorder from SQL server is a great tool to check really detailed recent changes on the SQL server, if you deleted something by accident or you don’t remember the exact something on the SQL server this can help you revert the changes. Play with it I am sure you will find it useful.

Helping SBC administrators kick-ass Google+

Posted in SQL

Leave a Reply

Your email address will not be published. Required fields are marked *

*