WMI Error: System.Runtime.InteropServices.COMException (0x80040208)

07 Nov
November 7, 2012

Lovely post title, and a very annoying error.

I ran into this error while trying to communicate with Windows Management instrumentation in order to get the PathName installation parameter of the MSReportServer_ConfigurationSetting class (which hooks up to a Report Server instance). The issue is a very vague COM exception that doesn’t really give much information, what made the issue worse is that it is not a connection issue to the WMI Namespace, which works absolutely fine, the issue happens when my code tries to load any data from the namespace that I already successfully established a connection to.

In this post I will be giving a very brief introduction into WMI for Reporting Services, the reason this issue was happening, and how I managed to resolve this issue for my particular case.

Read more →

SQL Server File Growth Email Notification

05 Nov
November 5, 2012

Detecting and reporting when a SQL Server database data or log file experienced a growth operation can be very useful for many reasons, such as:

  • Analyzing and predicting disk space utilization on the server
  • Detecting optimum values to setup for database growth
  • Detecting any long running transactions that causes growth in log or data files.

In this post I present a simple method for querying information regarding database growth activity within a SQL Server instance, as well as setting up a simple email alert that gets triggered based on a configured growth threshold.

Read more →

Diagnose SQL Server CPU Resource Starvation Issues with Email Alerts

04 Nov
November 4, 2012

Diagnosing CPU performance issues with SQL Server can be a bit tricky, particularly if you have a system that exhibit a CPU spikes pattern throughout the day. You could run some SQL DMVs in order to identify holistically how much CPU time each query is consuming, but that does not give you a real-time way of tracking CPU resource starvation on SQL Server.

Recently I have been asked to devise a system on a few of our servers that are experiencing CPU resource bottleneck issues, the monitoring system needs to identify when SQL Server is suffering from CPU bottlenecks, and report the queries currently running on the server via email alerts, along with performance statistics that can help you diagnose which queries are consuming most of the resources, and why are they doing so.
Read more →

Truncate SSIS Catalog Database Operation Log Tables

03 Nov
November 3, 2012

The SSIS Catalog in SQL Server 2012 comes with the benefit of logging natively integrated within the service’s architecture, which is awesome considering before SSIS 2012 BI developers and admins had to go for 3rd party tools in order to bring that level of logging into their SSIS packages.

That being said, with a lot of log data comes the responsibility of maintaining and clearing out old log entries and execution messages, which are stored on the SSIS Catalog Database and drive the SSRS reports that are used to diagnose the execution of packages, as well as provide performance statistics. The currently provided SSIS Server Maintenance Job in SQL Server Job Agent that performs these routine maintenance operation can be very slow and extremely blocking, especially on an SSIS server that sees alot of operations and activities, and cannot afford the downtime caused by the heavy locking experienced by this operation.

In this post I provide an introduction to the [internal].[cleanup_server_retention_window] stored procedure executed by the SSIS Server Operation Records Maintenance step in the SSIS Server Maintenance Job, as well as provide an extremely fast truncation query to completely clear out the SSIS log tables. In a  follow-up post I will be providing a rewrite of the [internal].[cleanup_server_retention_window] stored procedure that performs much better on SSIS services with a large number of logged operations per day.

Read more →

Why is my SQL Server Transaction Log not Shrinking (or Reusing the Log file)?

02 Nov
November 2, 2012

Trying to figure-out why your log file for a particular database is not “naturally” shrinking is the first steps you need to take in order to diagnose and resolve a large SQL Server transaction log file.

Transaction Log files generally grow because there is something that is stopping SQL Server from reusing the already allocated space to this file, which will essentially cause the Transaction Log file to grow (as per the growth configuration settings) in order to keep the database operational. This could be caused by a natural increase in utilization for that database, or by a blockage (an active operation running too long, or waiting on mirroring to complete), so before deciding how to proceed with resolving a large Transaction Log file, it is highly recommended to figure out why did this happen.

Read more →

Microsoft Big Data: Hadoop through HDInsight Server

25 Oct
October 25, 2012

After a year from announcing partnership and starting the collaboration project, Microsoft (SQL Server) and Hortonworks (Hadoop) have finally announced the result of this integration: Microsoft HDInsight Server and HDInsight Azure Service.

So what is HDInsight? well, it is essentially Microsoft’s Hadoop-based distribution which is built on top of the Hortonworks Data Platform. So if you download Microsoft HDInsight Server for a local installation of the Hadoop distribution, then you will end up with a local cluster with your own Hadoop Hive able to run Hadoop jobs, as well as benefit from the already released Hadoop integration points with SharePoint and EXCEL. This is just so powerful!

Read more →

Raspberry Pi as a Media Center with Smartphone Remote Control

18 Oct
October 18, 2012

I’ve always wanted to get into hardware as a hobby, when I was back in university one of our group projects was building a Lego Mindstorm mine detection robot, it was a lot of fun working with other people on this project and building out a fully functional robot with an AI capable of navigating a simple test environment, and performing tasks.

That was a while ago though, and between work and consultancy its been difficult finding time to cultivate this interest. Although recently I started reading up on the Raspberry Pi project, how can you connect it up with Bread Boards, Arduino modules and even how to turn it into a full blown Media Center controlled using the XBMC app on your IPhone or Android Smartphone. This I had to try.

Below I go through my experience of how I installed Raspbmc on my Raspberry Pi and configured XBMC media center and the Edimax wifi dongle to stream movies from my desktop PC, as well as control the XBMC media center through the IPhone app.

Read more →

Mobile BI Just Got Cheaper and Easier with ReportPlus

06 Oct
October 6, 2012

Mobile BI is clearly on our door-steps, with many organizations starting to integrate a level of Mobile Business Intelligence into their reporting and analytics road-maps, although the uptake has not been as strong as one might expect, this is mainly because of the following reasons:

  • The landscape of the Mobile BI reporting suites is still very new with only a few names out there that offer such solutions
  • Integrating a level of Mobile BI into your report offering could mean an increased level of complexity in terms of data preparation.
  • Due to a low number of providers, Mobile BI tends to be more expensive than what one might expect, which could increase the risks of a project revolving around such a system, causing managers to be deterred away from taking the first step, even if that steps allows for a competitive edge.

But this is all about to change, Mobile BI is becoming as easy as installing an App on your Tablet.
Read more →

Play Classic Retro Atari Games Online

02 Oct
October 2, 2012

In collaboration with IE9, Atari has released 8 classic games that have been ported into HTML5, these games can be played without any advertisement on  your Internet Explorer (9) browser, or with adverts on any other browser that support HTML5.

Read more →

Import Dmoz Content through C# to SQL Server

24 Sep
September 24, 2012

Dmoz (the Open Directory Project) has a wealth of data in relation to websites, as well as a comprehensive list of categories, this has been established through years of maintaining the directory (before and after being bought by Google), and being one of the most “sought after” real-estate in terms of link building.

Recently I came across Dmoz data through a classification research project I was working on, essentially we had a Naive Bayes classifier which we were trying to use to classify companies (through a description snippet) into categories, and then extract which other competitors of this company exist within the same category… Simples!

In order to import the Dmoz data into SQL Server, I resorted to using the Dmoz Data Importer solution by bodzebod, which although very good and did the job well for the Dmoz Structure files, which contains all the category classifications, bodzebod has not yet implemented the import of the Dmoz content file, which actually contains the data. This post presents a solution to importing Dmoz content file into a SQL Server database through C#, building on the work of bodzebod.

Read more →