SqlPackage a tool to import/export SQL Server and Azure SQL DB

SqlPackage is a command-line utility that you can use for exporting and importing operations in both on-premises SQL Server databases and in cloud databases. SqlPackage supports the following operations: Extract. Creates a database snapshot DACPAC file from a SQL Server database or from Azure SQL Database. Publish. Updates the schema in a live database to … Continue reading SqlPackage a tool to import/export SQL Server and Azure SQL DB

Moving the msdb, model, and tempdb databases files

All system databases, except the resource database, can be moved to new locations to help balance I/O load. To move the msdb, model, and tempdb databases, perform the following steps: For each file to be moved, execute the ALTER DATABASE ‚Ķ MODIFY FILE statement. Stop the instance of SQL Server. Move the files to the … Continue reading Moving the msdb, model, and tempdb databases files

Understanding parallelism on SQL Server

Parallelism refers to multiple processors cooperating to execute a single query at the same time. Parallel execution involves the overhead of synchronizing and monitoring the tasks. So, that's why parallel¬†plans are considered expensive operations. The query optimizer determines whether a parallel plan should be used based on the configuration and the query cost. A configuration … Continue reading Understanding parallelism on SQL Server

TempDB summary

  Tempdb is a special database available as a resource to all users of a SQL Server instance, you use it to hold temporary objects that users, or the database engine, create. In many respects, tempdb files are identical to the files that make up other SQL Server databases. From the perspective of storage I/O, … Continue reading TempDB summary

Wait Statistics

The first post about waits on SQL Server was regarding what SQL Server Wait means, a brief explanation and the concept might be difficult to catch at first. When the task needs to wait for a resource, it is placed on a list until the resource is available. SQL Server keeps detailed internal records of … Continue reading Wait Statistics

Locks everywhere

In this post I'm going to talk about locks on SQL Server. Locks are necessary, they are used in all operations in the database. Don't get confused about blocking, locking and blocking are totally different. When we talk about lock, doing something in the database, like an update and select though will cause a type … Continue reading Locks everywhere

Simple way to understand transaction isolation levels

I was talking with a friend about how a database works and she asked me to explain transaction isolation levels to her. So let's try... My first intent was to create an analogy with something simple, for example, a book. Two people trying to read/write on the same book. They can read at the same … Continue reading Simple way to understand transaction isolation levels