Uneven query executions with parallelism

We had a customer who was doing stress testing on a machine with 40 cores.   They designed a program that would launch multiple connections to execute the same query repeatedly based on their requirement to handle multiple concurrent executions.   The query was very CPU intensive and a parallel plan was generated.   As they increased concurrent…

3

How It Works: CMemThread and Debugging Them

The wait type of CMemThread shows up in outputs such as sys.dm_exec_requests.  This post is intended to explain what a CMemThread is and what you might be able to do to avoid the waits.  The easiest way to describe a CMemThread is to talk about a standard Heap, HeapCreate and the options (with or without…

4

SQLCLR and sp_OA* procedures are not compatible

We ran into an issue today that is a bug you may need to be aware of because of its behavior.   When a SQLCLR procedure calls back into the SQL Server (in proc provider) and executes sp_OA*, during the callback activity, it triggers a bug (currently filed and being evaluated) that results in heap corruption…

1

Azure SQL Database Import/Export Service – Change always brings both challenges and benefits

We recently upgraded the Import/Export Service to v3 of the DAC Framework (http://technet.microsoft.com/en-us/library/ee210546.aspx). This aligns the Import/Export service with what shipped with SQL Server 2012. Like all upgrades, this has brought both benefits and challenges. While overall we are seeing a significantly reduced amount of failures (both imports and exports), we are seeing some specific…

2

How It Works: SQL Server (NUMA Local, Foreign and Away Memory Blocks)

Applies to: SQL 2005, 2008, 2008 R2, and SQL 2012 versions. The NODE an operating system page, physically belongs to can be acquired using the QueryVirtualMemoryEx Windows API.  SQL Server uses this API to track locality of memory allocations. This blog is a very high level view of SQL Server behavior but I think it…

5

SQL Server 2012 Setup just got smarter…

For many years, I’ve been pushing for a way for our SQL Server setup to “fix itself” or “get smarter”. What I mean is that I’ve always wanted a way for setup to detect if any fixes are available online to apply as part of running the original installation. Consider the scenario where you are…

7

AlwaysOn ERROR: Log backup for database "MyDB" on secondary replica created backup files successfully but could not ensure that a backup point has been committed on the primary.

This error surprised me when it showed up in the error log so I decided to dig into it a bit more. “Log backup for database “MyDB” on secondary replica created backup files successfully but could not ensure that a backup point has been committed on the primary.  This is an informational message only.  Preserve…

1

FileNotFoundException with Microsoft.AnalysisServices.Xmla

I ran across two cases that were hitting the following Exception within SharePoint trying to run the PowerPivot Management Portal.  This was located in the SharePoint ULS Log: EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.AnalysisServices.Xmla, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.  File name: ‘Microsoft.AnalysisServices.Xmla,…

1

How It Works: Gotcha: *VARCHAR(MAX) caused my queries to be slower

The scenario: Table has a NTEXT column that the customer wanted converted to NVARCHAR(MAX) Data has both small and large storage for different rows Issued ALTER TABLE … ADD COLUMN …NVarCharColumn… NVARCHAR(MAX) Issued update MyTable set NVarCharColumn = <<NTEXT DATA>> Issued ALTER TABLE … DROP COLUMN .. <<NTEXT>> Sounds harmless enough on the surface and…

3