How to execute an unattended best practices review against a database

One of the many tasks of the DBA in charge on a development project is to make sure the team stays consistent in their code. Routine checks for SQL best practices such as naming conventions, right data types usage, problematic things like cursors, potentially fatal things like Deletes without Where clauses can cause a lot of headaches.

November 10, 2017

How to Detect SQL Server Performance Issues Caused by Incorrect Clustered Indexes

Description

A clustered index is critical to performance on any table. Not only does it dictate the logical storage of data for the entire table, but it also is the index that all others will reference when additional data is required. A poorly chosen clustered index can greatly hamper performance, causing latency, contention, and excessive IO. In this article, we will explore clustered indexes, and use ApexSQL Tools to assist in identifying those that could be improved upon.

November 9, 2017

How to create Copy-Only backups in SQL Server

Creating a foolproof disaster recovery solution is imperative for every business. After the Recovery Point Objective (RPO) and Recovery Time Objective (RTO) are defined, a database backup plan should be created to match these objectives. Most DBAs tend to automate the majority of tasks related to database backup plans. Regular database backup schedules are set in order to create continuous backup chains, that can later be used to recover a database in the case of a disastrous event. By setting the backup schedule, the continuity of the backup process is ensured, and most of the job is performed automatically on a regular basis.

November 7, 2017

How to version control SQL scripts alongside SQL database objects

This article explains how SQL database source control can help in version control SQL scripts alongside SQL database objects. Developing a software sometimes requires versioning not only database objects, but custom SQL scripts for migration, configuration, automation or other purposes

November 3, 2017

“What broke my database?” Using SQL database source control for forensic auditing and database troubleshooting

Besides the auditing trail of all the changes made against a database and having the information of who committed what and when, the main benefit of having a database under version control is the fact that the history of all the previously committed versions of any object (or a group of objects) can be used to find the exact version that broke the database at any point. Assuming that a SQL database under source control is being deployed on a daily basis or even more frequently, it is essential to ensure that only tested changes are committed so that a SQL database can be deployed in a working state, without any issues.

November 1, 2017

Using SQL source control to track database changes

The goal of this article is to explain how SQL database source control can help in auditing database changes. Tracking a change by itself is not the only task required for successful implementation of SQL source control, as we also want to know who made the change, when and why. After all of these inputs are known, any problems and be diagnosed and be fixed efficiently. We’ll see how having a SQL database under version control can help in keeping the auditing trail with a possibility to revert back to any of the previous version of an object.

October 31, 2017

Fatal action guard: guarding against inadvertent execution of code that may damage or destroy data in SQL Server

There are many opportunities, before, during and even after to guard against potentially fatal actions that may damage or destroy data, like executing an Update or Delete statement without a Where clause. Such a fatal action guard can be implemented in different ways and at different times, relative to the incident, for example, before it to prevent it from happening in the first place, or after, to reverse an action that has already been executed.

October 24, 2017

How to make SQL database version control safer with branches

The goal of this article is to explain how to use branches in order to diverge from the main development line aka master branch and leave it unaffected by all the committed changesets that are not yet tested and confirmed as good ones. As long as a separate branch is used to commit changes, a master branch can be used to deploy a working copy of a database from source control for any purposes.

October 23, 2017

How to set different connection colors in SSMS

Microsoft introduced a neat feature in SQL Server Management Studio (SSMS) in SQL Server 2008 that helps users quickly determine which connection a tab is currently using by setting custom connection colors in SSMS for different SQL Server nodes.

For database administrators who work on a multiple SQL Servers simultaneously, this feature is a time-saver that allows us to quickly determine which SQL Server we are currently using by looking at a color defined for the associated server.

October 18, 2017

General Data Protection Regulation (GDPR) compliance for SQL Server

On April 27, 2016, the European Parliament and the council of the European Union adopted a new standard, the General Data Protection Regulation on the protection of natural persons with regard to the processing of personal data and on the free movement of such data. The GDPR takes effect on May 25, 2018 and introduces numerous security and compliance regulations and obligations to all organizations worldwide, that handle, process, collect or store personal information of EU citizens. This means that organizations, both the data processors and data controllers, will have to elevate security measures and auditing mechanisms when handling personal identifiable information (PII) of EU citizens and be able to demonstrate compliance with GDPR standard at all time, not only on regular basis (monthly, yearly), but also on demand.

October 13, 2017