Monitoring Transactional Replication – The Distribution Queue
Note : The scripts for this article can be downloaded here. Monitoring the distribution queue is an important link in the chain of transactions delivery over a replicated topology. A chain that...
View ArticleProtecting Against SQL Injection
Despite being so well understood, SQL Injection remains one of the most common vulnerabilities in web applications. What is SQL Injection Any SQL which is dynamically created has the potential for...
View ArticleDefault Database Issues and Best Practices
What is Default Database? For every user, there is an option of setting a default database. So when that user connects to the SQL Server, they will be taken to the set default database. So in the above...
View ArticleSQL Server 2014: Encryption for Backups
The next version of Microsoft’s main stream relational database management system (RDBMS), SQL Server 2014, has the ability to encrypt data in the database while a backup is created. The pleasant...
View ArticleTroubleshoot Database Concurrency in SQL Server with sp_locks
General Database concurrency can be defined as the number of users that can work at a given database at the same time while not effecting or interfering with eachother’s work. The greater the number of...
View ArticleImplementing Transactions in SQL Server – Part II
In Implementing Transactions Part I I briefly described the role of Transactions in SQL Server and outlined a very basic implementation. In this second part, I will explain how a DBA can best implement...
View ArticleRefresh the Staging Server with Production Data – A Real World Scenario.
Recently I had to restore the Production Reporting Database Server onto our Staging environment for testing. This database was around 280 GB in size with around 120 GB of data in the Primary Data File...
View ArticleMonitoring Table Size Growth in SQL Server
General In this article I introduce a simple process that saves tables size information at points in time which latter allows for tracking down table growth over time. The process is useful in...
View Article12 Essential Steps After Installing SQL Server
Rolling out SQL Servers is a key task for DBAs. While for some DBAs this can be a frequent exercise, others will have to face it one time or other throughout their career in an organisation....
View ArticleCopy Only Backups for Adhoc Backups
Introduction In most organizations backup plans are implemented using full differential and transactional log backups. The normal scenario would be take a full backup on Sunday (off peak hours),...
View ArticlePhysical Join Operators in SQL Server – Nested Loops
SQL Server implements three different physical operators to perform joins. In this article series we will examine how each operators works, its advantages and challenges. We will try to understand...
View ArticlePhysical Join Operators in SQL Server – Hash Operator
In second part of this series on physical join operators we looked at the Merge Operator. In the final part of the series we turn our attention to the Hash operator. For this article series I am using...
View ArticleControlling Growth of a Distribution Database
I was recently asked to set up Transactional Replication comprising of 29 publishers as well as same number of subscribers. One interesting challenge was that the size of the distribution database...
View ArticleReport SQL Server Percentage Backup Completion and Time Completion
When executing a backup from a t-sql command, it is difficult to know what percentage has completed and when the backup will be complete. When you are taking a backup, you can specified STATS = 10 like...
View ArticleNotifications for SQL Server Agent Restarts
Introduction In this article we will set up an email notification at the SQL Server level whenever SQL Server and the SQL Server Agent Restarts. The article will useful for DBA’s who support a large...
View ArticleUsing DML Triggers to Capture Multiple Events
AS DBAs we often need to develop DML triggers to capture multiple entries which are either INSERTED, UPDATED or DELETED from a table. A few months back, I came across a situation where the Application...
View ArticleImplementing Database Settings Using Policy Based Management
Introduction Database Administrators have always had a tough time to ensuring that all the SQL Servers administered by them are configured according to the policies and standards of organization. Using...
View ArticlePractical Introduction to XML Manipulation Using XQuery in SQL Server
XQuery was developed by W3C as a query language designed to programmatically interact with and manipulate Extensible Markup Language (XML). XQuery uses XPath methods and expressions to search and...
View ArticleManage and Monitor Identity Ranges in SQL Server Transactional Replication
Problem When using transactional replication to replicate data in a one way topology from a publisher to a read-only subscriber(s) there is no need to manage identity ranges. However, when using...
View ArticleTips For Minimizing Deadlocks in SQL Server
A deadlock or fatal embrace is a situation which occurs when the a process is waiting for the resource that is locked by a second process and that second process is waiting for a resource that is...
View Article