Category: SQL

Troubleshooting 101

Posted by on January 17, 2010 | No comments

I’ve recently started in a new role which, of course, has brought with it new challenges 🙂

This weeks challenges related to SQL 2008 and Office Communications Server 2007 R2.

My SQL 2008 issue related to a “feature” known as Parameter Sniffing. In simple terms, SQL Server generates a execution plan based on the parameters passed to a stored procedure the first time it’s executed. Of course, given that the parameters passed may or may not be typically representative any given execution the “optimization” may be way off. A good indicator this is an issue is if you execute that SQL code in Query Analyzer and the time taken is significantly shorter than the same query run through an “optimized” stored procedure.

There is a really good overview of this on The workaround is fairly simple if a little annoying.

My other big issue I lost a fair amount of time to was with OCS 2007 R2.

Packet sniffing (using Wireshark or Microsoft Network Monitor) between my server running the Mediation Server role and my IP PBX (Cisco CallManager, but thats irrelevant) showed that the SIP FROM address being used to establish an outbound call was [email protected] and not using an e.164 number eg [email protected] This meant that the PBX was unable to establish an appropriate Caller ID to use when establishing the outbound call via the carrier.

After many hours of trailing top to bottom through all the config options for OCS, and seriously considering a fresh build of the core server, I found the issue was related to a setting being force in Group Policy from a previous OCS project.

This setting was forcing the OCS client to operate in the remote call control mode, which was overriding the setting on the OCS server that meant users were operating in Enterprise Voice mode. The setting in question is TelephonyMode and it was set to 2.

One nice little (undocumented!!) feature that came to light while troubleshooting this issue is the ability to get a summary of the operating OCS client configuration! Simply hold down the CTRL key and right click on the OCS icon in the system tray. Select the “Configuration settings” option and a nice little window will appear with a list of the settings in operation!

This helped me diagnose the issue as it showed the address my client was using for its Line setting was the setting it should have been using when I was previously using Remote Call Control of my Cisco handset and not my full e.164 number as I would have expected.

Always nice to finish a Friday on a positive note 🙂

Tags: , , , ,

Powered by Wordpress and Stripes Theme Entries (RSS) | Comments (RSS)