Monday, August 31, 2009

Report Builder 3.0

In the latest release of SQL Server 2008 R2, Microsoft has released an updated version of Report Builder called Report builder 3.0. One of the interesting aspects of this tool is the ability to create map based reports. These reports are built based on spatial data available through SQL Server Database or through the ESRI Shape file. The ESRI shape file can be found on Census sites or through the Dundas Maps site.






Developing MAP based reports and dashboards have been bought to the developers tool set, this should give them the ability to provide more visual reports to the business. This also greatly enhances the value and presentation of the reports. Here is a link to report builder 3.0 tutorial.
http://msdn.microsoft.com/en-us/library/ee240845(SQL.105).aspx

Friday, August 21, 2009

SQL Server Profiler-SSAS

Usually the sql profiler tool is used for analyzing queries written against sql server databases, typically to find performance bottlenecks. This tool is used to trap sql sent by SSRS/Applications communicating with a sql server database. One of things I wanted to try after having heard about it was to use the SQL Server profiler for Analysis Services cubes (SSAS). I connected to the analysis server and created a new profile, choose the standard option. Then I checked show all events, in the events selection tab there is a category called query processing which probably houses all the important events that happen when a cube is processed. There are events which show the MDX script being executed, Getting data from Aggregation,Cache , whether a subcube is being queried, these based on the results i saw are probably important events which can be analysed.






When looking at the results generated from these events, it gives a better idea of what happens beneath the cube in terms of which dimensions are being queried. Based on the findings this aspect of sql profiler adds an another useful aspect to the already existing important features.

Tuesday, August 18, 2009

SSIS-Package Property

I had a situation where in data had to be transformed on several tables (more than 15 tables). For the data transformation based on the business rules stored procedures were used, then i ran into the next challenge. I did not want to run the 15 stored procedures in a sequential manner within SSIS package. At this point these processes were going to run in parallel in the SSIS package. One of the issues which i was going to run into was there could be more tables added to the transformation and I would need more stored procedures to be run in parallel. Here in I stepped into the property set at the package level called MaxConCurrentExecutables. This is present at the package level as mentioned before can be see here in the image below. The property is highlighted in agreen color text.


The number was changed to 20 on the property and the package execution time was better than prior to changing the value for this property. There is a definition of the MaxConcurrentExecutables at MSDN.

http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.package.maxconcurrentexecutables.aspx

Monday, August 10, 2009

Generating Reports Through WebService...

Usually once the reports are developed, they are deployed to the report server and the end users can view the report from the reporting portal. I ran into a situation where i had to perform data driven subscription kind of reports. Here the requirement at a set time of the day, the reports had to be generated in a .pdf format and stored in a network folder. In order to accomplish this, the reportexecution2005.asmx web service was used. The reference material at the MSDn site helped me guide to accomplish this effort. The .asmx file mentioned above is present in the report server. I added this file as a web reference to my project, once this was done there are methods which need to be used to generate the report. The methods are LoadReport,Render,GetExecutionInfo. The render method performs the actual rendering of the report. The output is then put out to the pdf file at the required location using the FileStream object. This whole thing was done in C# console application.

Sample Code:

ReportExecutionService rs = new ReportExecutionService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://myserver/reportserver/reportexecution2005.asmx";

The link to the msdn article:
http://msdn.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsexecutionservice2005.reportexecutionservice.render.aspx

Tuesday, July 28, 2009

SSRS 2008...

I have been working with SSRS 2008 for a while now and have come across a couple of things. The first one seems like a bug in SSRS 2008, it has to do with the ReportItems collection. When you have columns placed on the report, the actual values are displayed in textboxes in the report. These textboxes are part of the ReportItems Collection, when one is in the ExpressionBox and you type ReportItems!, you can see a list of textbox item ID's. In the situation i ran into I typed in ReportItems!textbox40 in the expression, at preview time of the report i kept getting an error saying item not found or cannot be part part of the expression. After a few tries ,it kept getting frustrating and it was not listed in the collection, finally I put the exact name like ReportItems!Textbox40 and it worked. The issue was the case sensitivity of the name, also noticed in the ReportItems collection there are some with lowercase names and other with the first Character capitalised. I hope in the future releases these are made consistent.
One of the neat features available in SSRS 2008 is the adjacent Group feature in the tablix control.


This provides a great of flexibility in grouping, it allows grouping of the data in 2 different ways in the same control. One of the things I had to do was represent 2 parent child relationships in the same report, for this the adjacent group feature was very handy.

Friday, July 17, 2009

Data Mining...

Yesterday i had been to a Data Mining Conference in Cary,NC. The topic of presentation was about the usefulness of Data Mining and utilising the JMP Software for Data Mining. The JMP software came out of SAS, this is more aimed for the Desktop users who want to perform Data Mining tasks, there are 2 versions available 32-bit and 64-bit. One of the Key factors mentioned about Data Mining was that around 60-90% of the time is spent in the Preparation of data. The key aspect in Data mining projects is to define the Business goal/problem statement clearly. The lecture was delived by Dick De Veaux, is a Professor in the Department of Mathematics and Statistics at Williams College in Williamstown, MA. Once can google on his name to find out about his talks on Data Mining. There were Data Mining Methods Discussed which are part of the SQL Server 2008 Analysis Services Suite. The talk also bought about the differences between methods used for Descriptive and Predictive Data. For any one intesrested in the Jmp software, here is the web site: www.jmp.com.

Friday, July 10, 2009

Data Compression-SQL Server 2008

We have a sizeable data mart with around 50 tables. Initially they did not have any compression methods applied on them. In SQL Server 2008 there are two kinds of compression which are exposed at the table level: They are Page and Row compression. These techniques enable great space savings and also better query performances. One of things which i noticed was it takes lesser time to load the pages of the table into the memory when it is compressed, this has give me better query performances. In SQL Server 2008 there is a Data Compression Wizard available through SSMS. This feature allows the developers to test out the compression space savings. The Data compression option is set at the table level, this can be done at the CREATE TABLE or ALTER TABLE statements. The wizard is launched by right clicking on a table.





When you choose the Manage Compression Option, the Data Compression wizard comes up.



In this under the Compression Type dropdown there are the Page and Row Compression. When any one of these is chosen one can choose the calculate option and figure out the space savings as listed under the Current Space and Requested Compressed Space. In my Scenario i achieved more savings using Page Compression.