SQL Server Replication Process Could not Read File due to OS Error 5

20 Apr
April 20, 2012

Resolving the following SQL Server Replication error is easy enough, and is general linked to access to replication folders on the Distributor file-system, from the Subscriber Agent account.

The full error message will look something like this:

The process could not read file ‘‘ due to OS error 5. (Source: MSSQL_REPL, Error number: MSSQL_REPL20024)

Read more →

SQL Server Cannot Reinitialize Subscriptions of non-immediate_sync Publications

19 Apr
April 19, 2012

Sometimes when trying to initialize a subscription on a SQL Server database that is involved in a replication topology, you could run into the following error message:

Cannot reinitialize subscriptions of non-immediate_sync publications
Change database context to ‘[db-name]‘.
Error: 20159

A pretty nasty message that means very little.

Read more →

SQL Replication The Initial Snapshot for Publication is not yet Available

19 Apr
April 19, 2012

While setting up SQL Server Replication (Transactional Replication to be specific), I had successfully created the Publication and the Subscriptions, but nothing was being replicated between the publisher SQL Server instance and the subscriber SQL Server instance.

When viewing the subscription details through the Replication Monitor tool, the subscription was not throwing an error, and hanging with the following message:

The initial snapshot for publication is not yet available.

In the post I will explain why this is appearing, and how to resolve the issue and generate the required Replication Snapshot.

Read more →

SQL Azure Labs Data Explorer Tool

18 Apr
April 18, 2012

Microsoft has been trying to leverage its Azure (SQL Cloud) platform for a while now through enhanced availability and performance, as well as creating a few “unexpected” connectors, such as the Hadoop to SQL DB Connector, which is now available as a beta in an Azure environment.

Read more →

Integration Service Object Name is not Valid Error

09 Apr
April 9, 2012

While trying to migrate my old SQL Server Integration Services (SSIS) packages from the legacy Package Deployment Model project to a Project Deployment Model one, I ran into the following error on some (not all) SSIS package after selecting it for import:

Object name ‘[object-name]‘ is not valid. Name cannot end with a whitespace.

This is a typical frustrating SSIS error message, uninformative and goes nowhere. Hopefully the tip here should help you get around the error in this particular situation.

Read more →

SSIS 2012 Features and the Project Deployment Model

08 Apr
April 8, 2012

With SQL Server 2012, Microsoft has released a major and much needed update to its SQL Server Integration Services, including features that enable much better manageability features, performance tracking (and SSIS performance tuning) features, as well as better (closer) integration with SQL Server Database Engine.

In this post I introduce the new features of Integration Services that are enabled through the new Project Deployment Model, as well as highlight some of the short-comings of this new technology, particularly with regard to Scale-Out and Distributed Processing.

Read more →

Optimizing SQL Server Wait Types

26 Mar
March 26, 2012

Optimizing SQL Server’s Wait Types can be a daunting task, there are so many interdependencies to account for, and most of the time optimising a Wait Type could mean sacrificing other system resources (such as disk space) or SQL tasks (such as INSERTs on the underlying table through index creation).

This post will give you a quick reference and overview on all the SQL Server Wait Types, as well a quick way to optimize each single or class of Wait Types (such as optimizing PAGEIOLATCH_EX, ASYNC_NETWORK_IO or WRITELOG etc.).

Read more →

Getting Started with PowerView

25 Mar
March 25, 2012

This is a short post to get you started with Microsoft’s new PowerPivot technology, which is part of the new SQL Server 2012 Self-Service BI.

Read more →

Merge Join – SQL Server Graphical Execution Plan

25 Mar
March 25, 2012

Merge Join can be a very fast join operation, although it has some underlying behavior that could dramatically increase the over-all cost this operator has on the query execution plan.

In this post I will go through how SQL Server utilizes the Merge Join operator for performing logical join operations, as well as the different types of Merge Join and how to optimize a Merge Join operation.

Read more →

Nested Loops Join – SQL Server Graphical Execution Plan

25 Mar
March 25, 2012

Nested Loops Join operator (represented by the image on the left in SQL Server’s Graphical Execution Plan) is used by SQL Server to join two tables or indexes together, this is generally an efficient operator especially, and superior to Hash or Merge Joins when being operated on small data-sets.

In this post I will go through when SQL Server execution plan decides to employ the Nested Loops operator, the different types of Nested Loops Joins, and finally how to try and optimize a large Nest Loops Join operation.

Read more →