SQL Server Tips, Articles and Training

SQL Server resources to solve real world problems for DBAs, Developers and BI Pros - all for free. Check out tips, articles, scripts, videos, tutorials, live events and more all related to SQL Server.

Trent Sherman

Solving Oracle Performance Issues in 4 Easy Steps

Join us for a look at how SolarWinds Database Performance Analyzer (DPA) provides detailed performance data for Oracle environments, allowing DBAs to solve complex performance issues in less than four steps.

Author: Trent Sherman

Aaron Bertrand

SQL Server Split String Replacement Code with STRING_SPLIT

In this article we look at how to use the STRING_SPLIT function and replace older implementations of string split functions.

Author: Aaron Bertrand

Erica Woods

8 Actions for your Annual Career Audit

Here are the 8 career actions we recommend taking during your quarterly or annual career audit to make sure you are always prepared for whatever changes may come your way.

Author: Erica Woods

Scott Murray

Power BI: What I wish I knew when I started?

In this article we look at several tips I would like to share about Power BI that I wish I knew when I started working with Power BI.

Author: Scott Murray

Koen Verbeeck

Power BI Desktop Data Source Considerations

In this tip we look at different ways to get source data to use with Power BI.

Author: Koen Verbeeck

Edwin Sarmiento

Manual Failover of SQL Server Always On Distributed Availability Group for Disaster Recovery Testing

In this article we cover the steps to manually failover a SQL Server Distributed Availability Group.

Author: Edwin Sarmiento

Bhavesh Patel

Group By in SQL Sever with CUBE, ROLLUP and GROUPING SETS Examples

In this article we look at different examples of how to use GROUP BY with your SQL Server queries and the different results you get with the various options.

Author: Bhavesh Patel

Sergey Gigoyan

Monitor Deadlocks in SQL Server with system_health Extended Events

In this article we look at how to find SQL Server deadlocks using the system health Extended Events session.

Author: Sergey Gigoyan

Cate Murray

Elevator Pitch Examples

"Tell me about yourself." What a loaded question that is, but it is one of the most important and most common questions you will get asked throughout your professional career.

Author: Cate Murray

Aaron Bertrand

How To Find Space Used by Tables and Indexes in SQL Server Part 3

In this article we look at scripts to quickly find the largest tables in a SQL Server database either by size of number of rows.

Author: Aaron Bertrand

Mircea Dragan

How to Compare Database Schema in SQL Server - Part 1

In this article we look at a way to compare database schemas between two different databases using C# and JSON.

Author: Mircea Dragan

John Miner

Business Critical Tier of Azure SQL Services

Learn about the Azure Business Critical tier of services to help with mission critical SQL Server applications that have high transaction rates and require low latency response times.

Author: John Miner

Rick Dobson

Query Tuning in SQL Server with Set Statistics IO

This tip focuses on tuning SQL Server queries with the set statistics io statement. This statement draws a distinction between physical reads and logical reads as well as data scans. Physical reads focus on transferring data from disk storage to memory in a data cache (sometimes called a data buffer pool). Logical reads refer to reads from the data cache. SQL Server builds an execution plan for data only after it is transferred from disk storage to the data cache. Scans refer to how many times data are scanned or searched for a specific query after they are transferred from disk storage to memory. The statistics generated by the set statistics io statement pertain to physical reads, logical reads, and scans of data.

Author: Rick Dobson

Matteo Lorini

How to Export Data from SQL Server to Excel

In this tip we look at how to write T-SQL and R code to export data from a SQL Server query to a new Excel file.

Author: Matteo Lorini

Rick Dobson

Capture Duration Metrics for SQL Server Query Tuning

In this article we look at how to capture duration metrics for SQL Server code to determine which code variation runs the fastest.

Author: Rick Dobson

Vitor Montalvao

Migrate SQL Server database to Azure VM

In this tip we look at a simple process to move an on-premises SQL Server database to an Azure VM with SQL Server.

Author: Vitor Montalvao

John Miner

SQL Server Integration Services Flexible File Task with Azure Data Lake Storage

In this tip we look at how to use the SSIS flexible file task to copy and delete files saved in Azure data lake storage.

Author: John Miner

Eli Leiba

Shrink SQL Server Transaction Log for all Databases

In this tip we look at a script you can use to shrink all SQL Server user database log files back to the original size or as small as possible depending on free space in the log.

Author: Eli Leiba

Ron L'Esteve

Fast Way to Load Data into Azure Data Lake using Azure Data Factory

In this article we look at how to load data faster for big data tables from an on-premises SQL Server to Azure Data Lake Store Gen2 using Azure Data Factory.

Author: Ron L'Esteve

Joe Gavin

How to Take SQL Server Database Offline

In this tip we look at different ways to take a SQL Server database offline.

Author: Joe Gavin

Eric Blinn

SQL Server Index Basics

In this tip we provide an overview of SQL Server clustered and non-clustered indexes and some things you should know about creating and maintaining these types of indexes.

Author: Eric Blinn

Greg Robidoux

SQL Server Management Studio Keyboard Shortcuts - Complete List

This article is a quick reference guide to over 120 available keyboard shortcuts in SQL Server Management Studio (SSMS).

Author: Greg Robidoux

Fikrat Azizov

Automate Azure Analysis Services Management Tasks using Logic App - Part 1

In this tip we look at how to automate Azure Analysis Services model refresh tasks using Azure Logic App.

Author: Fikrat Azizov

Sergey Gigoyan

Install SQL Server from Configuration File with Installation Center

Learn how to build a SQL Server Configuration file from the Installation Center and then use this configuration file for subsequent installations.

Author: Sergey Gigoyan

Ben Snaidero

Using SolarWinds Database Performance Analyzer to Diagnose Performance Issues

Learn about how to address SQL Server performance issues such as blocking, high CPU utilization, excessive IO and more with SolarWinds Database Performance Analyzer.

Author: Ben Snaidero

Ray Barley

Run SQL Server Agent Job from SSIS

We make extensive use of SQL Server Integration Services (SSIS) packages to perform all sorts of Extract, Transform and Load (ETL) operations. We have many SQL Server Agent Jobs and SQL Server Reporting Services (SSRS) report subscriptions that we want to launch at certain points in our SSIS packages. Can you provide a solution that we can use to accomplish this?

Author: Ray Barley

Ohad Srur

Use Excel Parameters to Dynamically Export SQL Server Data

In this article we look at how to load data into Excel from SQL Server using parameters to fetch the data to dynamically build the dataset.

Author: Ohad Srur

Jeremy Kadlec

SQL Server Download Quick Links

SQL Server download quick links are included in this tip for the SQL Server engine, Express Edition, Service Packs, tools and more. Be sure to bookmark this page to use as a quick and comprehensive reference guide.

Author: Jeremy Kadlec

Mohammed Moinudheen

Restore an Azure SQL VM using Recovery Services Vault

In this tip we look at the steps to restore an Azure virtual machine that has SQL Server on it. We will first do a backup of the VM and then walk through how to restore the VM.

Author: Mohammed Moinudheen

Koen Verbeeck

Migrate a Package Deployment Integration Services Project to Azure

In this article we look at you can lift and shift your on-premises SSIS project to Azure if it is using the package deployment model.

Author: Koen Verbeeck

Aubrey Love

SQL Server Collation Overview and Examples

In this tip we look at what Collation means for SQL Server and how to use this when querying data or creating database objects or databases.

Author: Aubrey Love

Aaron Bertrand

SQL Server Index and Partition Space Usage - Part 2

In this tip we look at how to additional space used information for SQL Server filegroups and files.

Author: Aaron Bertrand

Vitor Montalvao

Azure VM Deployment Best Practices

Learn about the options to deploy Azure VMs including location, sizing, costs, operating systems, name, network, storage and tips to help you with your daily SQL Server administration tasks.

Author: Vitor Montalvao

Jeremy Kadlec

SQL Server Concepts

Learn about the core concepts in SQL Server to build your skill set including the architecture, database design, development, administration and more.

Author: Jeremy Kadlec

John Miner

SQL Server Integration Services Flexible File System Task with Azure Blob Storage

In this article we look at how to use the SSIS Flexible File Task to replace existing file management code used with Azure Blob Storage.

Author: John Miner

Jeremy Kadlec

Quickly Pinpoint SQL Server Performance Issues with SolarWinds Database Performance Analyzer

My team needs to quickly pinpoint the performance issues in my SQL Server environment. With all of the demands at work, our team needs to find and understand the issues, then review the code and take corrective actions. We need to ensure our production SQL Server environment is running smoothly, because when it is not, the entire company feels it.

Author: Jeremy Kadlec

Daniel Farina

How to Attach a SQL Server Database without a Transaction Log and with Open Transactions

You want to attach a SQL Server database that does not have the transaction log files and get the following error: "The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure." In this tip I will help you to successfully attach the transaction log to the problematic SQL Server database.

Author: Daniel Farina

Jeremy Kadlec

Intelligent SQL Server and VMware Performance Monitoring Software - Database Performance Analyzer

We have a large SQL Server environment supported by physical servers, VMware and cloud infrastructure. We believe this architecture will be the reality for our organization for a number of years to come. Unfortunately, we are facing a number of challenges. We have frequent situations where the end user experience degrades. My team of SQL Server professionals knows that no code changes have been made, so we start hunting for answers pouring over logs, querying the DMVs, etc. Then out of nowhere the end user response time is back to normal with no changes from my team. We have no explanation and need answers.

Author: Jeremy Kadlec

Rick Dobson

Set Statistics Time Examples for Tuning SQL Server Queries

The SQL Server set statistics time statement displays the number of milliseconds to parse, compile, and execute a T-SQL query statement. This set statement is widely used to assess times to implement a query statement. The set statistics time statement reports the CPU time and elapsed time for performance tuning.

Author: Rick Dobson

Erica Woods

Job Search Plan Task List

Learn about the most common Job Seeker activities from preparation through excelling at the interview to post interview recommendations that can be broken down on a weekly basis.

Author: Erica Woods

Nai Biao Zhou

Statistical Parameter Estimation Examples in SQL Server and R

This tip shows a step-by-step solution to use sample statistics to estimate population parameters using SQL Server and R.

Author: Nai Biao Zhou

Aaron Bertrand

SQL Server Date Video Tutorial

In this video tutorial we will look at the different data types that SQL Server offers for storing date and times in a database table. We will compare the differences for the data types as well as do a storage test to determine the difference...

Author: Aaron Bertrand

Koen Verbeeck

Snowflake Tutorial

In this tutorial we will go over the basics of Snowflake, introducing the product and features which makes it stand out against its competitors. We look at how to load and query data as well as how to use Power BI to create reports using the Snowflake...

Author: Koen Verbeeck

Jeremy Kadlec

SolarWinds Database Performance Analyzer for SQL Server

With the time constraints SQL Server DBAs face to resolve performance issues, they need a tool to support business critical applications. SolarWinds Database Performance Analyzer (DPA) is an end to end tool to collect data and recommend corrections.

Author: Jeremy Kadlec

Jeremy Kadlec

Optimize SQL Server estate monitoring with Redgate's SQL Monitor

How can we balance our need to monitor SQL Server performance and operational processes across hundreds of SQL Servers, but also save time by focusing on the highest priority issues?

Author: Jeremy Kadlec


Secrets to Fast, Easy High Availability for SQL Server in Amazon Web Services

Moving SQL Server from an on-premises data center to a public cloud such as AWS can enable your business to be more agile and more responsive to changing market requirements and customer needs.

Author: SIOS

Eric Blinn

SQL Server MSDB Database Tutorial

In this tutorial we will cover common questions related to the SQL Server msdb database. This is one of the standard system databases that are part of every SQL Server installation. This tutorial will give you a better idea of what the msdb database...

Author: Eric Blinn

Jeremy Kadlec

Melissa Data Quality Solutions for SSIS

For organizations relying on the SQL Server, Melissa's solutions directly integrate with SSIS, so the learning curve is minimal. You can drag and drop Melissa components in SSIS to validate, cleanse, append and enhance data.

Author: Jeremy Kadlec


get free sql tips
agree to terms

Learn more about SQL Server tools