SQL Server Tools

SQL Server 2016 Stretch Database

On June 1, SQL Server 2016 was released. It brought a large number of novelties into normal development, including the long-announced Stretch Database technology that allows migrating data from SQL Server dynamically to Azure. (more…)

Getting Real Currency Exchange Rates with Data Generator for SQL Server

This article will demonstrate how to get live currency exchange rates with the help of Python and dbForge Data Generator for SQL Server.

Currency exchange rate is the reference information used in the translation of monetary values from one currency to another. The exchange rate expresses the value of one currency in terms of another. (more…)

Devart is the GOLD sponsor of SQLSaturday #508 – Kiev 2016

Devart sponsored SQLSaturday #508, that took place on May 21, 2016 in Kiev, Ukraine.

Besides databases, there were a lot of interesting sessions on the popular topics: BI, Data Science, Big Data, Machine Learning, and others. (more…)

Devart attended and sponsored SQL Day 2016 — Annual Conference of Polish SQL Server User Group Association

Devart was excited to participate and sponsor SQL Day 2016 that took place on May 16 – 18 in Wrocław, Poland. The event has ended less than a week ago and we are already looking forward to what’s next in 2017!
SQLDay is the largest Microsoft data platform summit in the East Central Europe. (more…)

SQL Server Execution Plans

One of the best methods to analyze the query performance is to explore the query execution plan. A query plan or query execution plan is an ordered set of steps utilized to access data in a SQL relational database management system. In this article, we will discuss the basics of the Query Execution Plan feature available in SQL Server. (more…)

Generating Related Data Elements with dbForge Data Generator for SQL Server

Recently we got an interesting question from our user:

The docs don’t address directly, but how can we generate three related data elements, like date (more…)

SQL Server 2016 RC0

The news about Microsoft’s intention to “chum” SQL Server with Linux keeps floating around. But I haven’t heard a single word about SQL Server 2016 Release Candidate, that recently became available for download. (more…)

Backup and Restore Databases in SQL Server

In this article, we will talk about the benefits of backing up SQL Server databases, different backup types, and backup strategies.

The immediate purpose of creating database backups is the ability to recover a damaged database and minimize the risk of catastrophic data loss. Thus, a reliable use of backup and restore for recovery requires a backup and restore strategy. (more…)

Enabling AUTO_CLOSE is a bad idea?

From a personal perspective, allowing a production database to run with AUTO_CLOSE option is not the best practice. Let me explain why you should not enable AUTO_CLOSE and the consequences of using this option.

The other day, I had to look in Error Log on a test server. After a two-minute timeout, I saw a great number of messages stored in the log, and I decided to check the log size using xp_enumerrorlogs:

DECLARE @t TABLE (lod_id INT PRIMARY KEY, last_log SMALLDATETIME, size INT)
INSERT INTO @t
EXEC sys.xp_enumerrorlogs

SELECT lod_id, last_log, size_mb = size / 1048576.
FROM @t
lod_id   last_log              size_mb
-------- --------------------- ---------------
0        2016-01-05 08:46:00   567.05288505
1        2015-12-31 12:53:00   1370.39249420
2        2015-12-18 11:32:00   768.46394729
3        2015-12-02 13:54:00   220.20050621
4        2015-12-02 13:16:00   24.04152870
5        2015-11-16 13:37:00   80.07946205
6        2015-10-22 12:13:00   109.33527946

(more…)

What is faster inside SUM & AVG: 0 or NULL?

There are three aggregate functions that are most often used in practice: COUNT, SUM and AVG. The first one has already been discussed previously, while the other two have interesting performance nuances. But first, some theory…

When using aggregate functions in the execution plan, there may be two operators: Stream Aggregate and Hash Match, depending on the input stream.

The first may require pre-sorted set of input values, while Stream Aggregate does not block the execution of subsequent operators.

In turn, Hash Match is a blocking operator (with rare exceptions) and does not require sorting of the input stream. Hash Match uses a hash table that is created in memory, and in the case of incorrect assessment of the expected number of rows, the operator can spill the results into tempdb.
(more…)