SQL Server General DBA

Transactional Replication – Violation of Primary Key Constraint

Recently, I encountered a case where the Transactional Replication between our Production OLTP server named XYZ and Reporting database server named PQR went out of sync. Both the servers were located in the same Data Centre in the USA. The Reporting database was used by the users in Canada for fetching the data from the […]

Understanding SQL Server Query Optimization – Part 1

In the first of this four part series I will give an overview of the tools and techniques of query optimization in SQL Server Most of the activity of the database server is related to queries. Because of this, query optimization is often a major concern. SQL Server tries to optimize query performance itself, but […]

Guide to SQL Server Table Indexes – Part 4

In the first part of this article series, you learned about the basics of SQL Server database table’s indexes, the difference between the clustered and non-clustered indexes, and how the leaf nodes, non-leaf nodes, and heaps associated with data storage. In the second and third part, you learned about the different types of indexes available […]

Guide to SQL Server Table Indexes – Part 3

In the first part of this article series, you learned about the basics of SQL Server database table’s indexes, the difference between the clustered and non-clustered indexes, and how the leaf nodes, non-leaf nodes, and heaps associated with data storage. In the second part, you learned about the different types of indexes available in SQL […]

Guide to SQL Server Table Indexes – Part 2

In the first part of this article series, you learned about the basics of SQL Server database table’s indexes, the difference between the clustered and non-clustered indexes, and how the leaf nodes, non-leaf nodes, and heaps associated with data storage. In this part and next part, you will learn about the different types of indexes […]

Guide to SQL Server Table Indexes – Part 1

Overview One of the most important tasks for every database administrator (DBA) is to ensure that query times are consistent with service-level agreement (SLAs) or within user expectations. One of the most effective techniques to achieve this objective is to create indexes on tables for your queries.  SQL Server uses indexes to sort and organize […]

Package and MSDTC Transaction Configuration

Introduction Once application development is complete, we need to move deployment packages to the production environment. To simplify the deployment process Microsoft has provides a utility tool called the deployment manifest which takes care of the package deployment. However, if your package utilizes transactions we need to take some measures in order to avoid connection […]

Export to XML Using SSIS

Recently I was given a task to export data in XML format using SSIS. I initially thought it should be straight forward – just dump it in a flat file and give it a name xml type, however SSIS has no XML destination just an XML source. I had no luck dumping the XML in […]

SQL Server Transactions and Locking – Part 2

In the first part of SQL Server Transactions and Locking article series, you learned the basics of SQL Server transactions, how they work and how to handle them, and how to write procedures that use transactions. In this part, I will give an overview of SQL Server locking and transaction isolation levels, how to set […]

Migrating SQL Server Databases – The DBA’s Checklist (Part 3)

Continuing from Part 2 of the Database Migration Checklist series: Step 10: Full-text catalogs and full-text indexing This is one area of SQL Server where people do not seem to take notice unless something goes wrong. Full-text functionality is a specialised area in database application development and is not usually implemented in your everyday OLTP […]