How to use Python in SQL Server 2017 to obtain advanced data analytics

June 20, 2017 by

On the 19th of April 2017, Microsoft held an online conference called Microsoft Data Amp to showcase how Microsoft’s latest innovations put data, analytics and artificial intelligence at the heart of business transformation. Microsoft has, over the last few years, made great strides in accelerating the pace of innovation to enable businesses to meet the […]

All about locking in SQL Server

June 16, 2017 by

Locking is essential to successful SQL Server transactions processing and it is designed to allow SQL Server to work seamlessly in a multi-user environment. Locking is the way that SQL Server manages transaction concurrency. Essentially, locks are in-memory structures which have owners, types, and the hash of the resource that it should protect. A lock as […]

How to document SQL Server database objects

June 14, 2017 by

Introduction In any good programming reference, you will read that a developer has to document his code, not only for him/herself but also for the person who, ten years later will be asked to maintain it. This would, of course, be made easier thanks to a good documentation of existing code.

How to monitor total SQL Server indexes size

June 12, 2017 by

SQL Server indexes overview Just like a book index, SQL Server index has a similar purpose, to provide faster searching, gathering and sorting of information from a database, without need to go through all of the objects over and over. Instead, an index provides the gateway between the table rows and query engine, in order […]

How to use Window functions in SQL Server

June 9, 2017 by

All database users know about regular aggregate functions which operate on an entire table and are used with a GROUP BY clause. But very few people use Window functions in SQL. These operate on a set of rows and return a single aggregated value for each row.

Top SQL string functions in SQL Server 2017

June 8, 2017 by

SQL Server 2017 has been in the talk for its many features that simplify a developer’s life. With the previous versions, developers had to write T-SQL, or user-defined functions using temporary tables, and build complex logic, just for string manipulation. In almost every database I work with, I see many user-defined functions for string manipulation […]

How to report on SQL Server deadlock occurrences

June 8, 2017 by

Introduction In the previous article entitled “What are SQL Server deadlocks and how to monitor them“, we’ve seen how a deadlock can occur and which tools are available to DBA or developer to get simple or extended information about the conditions that lead a particular deadlock situation to occur.

SQL Server Database Architecture and Audits for Enhanced Security

June 5, 2017 by

This year, digital security has risen as a top concern for many people, especially after the recent security compromises with Cloudflare in February and ransomware in May. Throughout the last two years, we’ve also seen the rise of sim-swapping where a hacker is able to extract a user’s cell phone data and compromise all emails […]

Deep dive into SQL Server Extended events – The Event Pairing target

May 30, 2017 by

Extended event sessions can use multiple targets to store captured information. We should use different targets depending on the type of data we are capturing and the structure of the data outcome we desire. The available targets include the following: event counter, ring buffer, event file, histogram, event tracing for Windows (ETW), and Event Pairing.

A T-SQL design pattern for logging process execution

May 25, 2017 by

Introduction Context Back in my days at school, I followed a course entitled “Object-Oriented Software Engineering” where I learned some “design patterns” like Singleton and Factory. If you are not familiar with this expression, here is a definition of a design pattern from Wikipedia:

Understanding Skewed Data in SQL Server

May 22, 2017 by

Introduction I recently did some research to analyze skewed data distribution in SQL Server. This article is the outcome of my analysis to share with SQL Server community. SQL Server understands its data distribution using statistics. The SQL Server query optimizer then uses the statistics to calculate estimated row counts when executing the queries submitted […]

T-SQL as an asset to set-based programming approach

April 27, 2017 by

Introduction This article is the third and last one of a series of articles that aims to introduce set-based programming approach inside SQL Server, so using Transact SQL. In first article “An introduction to set-based vs procedural programming approaches in T-SQL”, we’ve compared procedural and set-based approaches and came to the conclusion that the second […]

https://cloud.githubusercontent.com/assets/17677104/25289657/2ec05c1a-2690-11e7-8a6d-1c9545fd04c1.png

T-SQL for DBAs – Three ways of using T-SQL for quick data analysis

April 26, 2017 by

Background As a database administrator, sometimes you need to identify details about a problem as quickly as possible and being able to build and analyze data for analysis will help you solve the problem. From getting information about the latest backups, to saving information about waits or indexes and comparing that to other captured metrics, […]

Machine generated alternative text: using (var conn — using (var cmd conn . Open(); cmd . cmd cmd cmd cmd . new Sq1Connection(connString)) new Sq1Command()) level, exception conn ; Command Type . Text ; string. Format ( sq1Temp1ate , Connection - . Command Type - . CommandText - . Command Timeout — conn . Connection Timeout; ExecuteNonQuery() ;

SQL Server Code Review Checklist for Developers

April 26, 2017 by

In a software development life cycle, Code Review plays an integral role in improving the product quality. Having a Code Review Checklist is indispensable since it ensures that the best practices are followed and reviews are performed consistently. It is essential for developers to be aware of the coding guidelines while working on their code […]