When thinking about migration the most common issue is downtime. There are some methods that require downtime like backup/restore or less downtime using Log Shipping. You can choose several different methods to migrate your database. For example, methods that require downtime include: Backup the database, manually copy the backup file to the machine and then … Continue reading Database migration methods
Stretch Database is a feature of SQL Server where data can be split between on-premises storage and cloud storage. With Stretch Database, cold, historical data is kept in the cloud and active data is kept on-premises for maximum performance. Stretch Database requires no changes to client applications or existing Transact-SQL queries, so you can implement … Continue reading What is Stretch Database?
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
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
Locks everywhere is a good start to understand how SQL Server provides logical consistency. Every operation has a lock and latch. What does Latch mean? Latch protects memory on Buffer Pool, is a method that provides physical consistency. SQL Server does operations in memory, that means, it read the page from disk and put that … Continue reading Difference between Lock and Latch
SQL Server stores data in heaps or b-tree structures. Heaps are unordered set and balanced trees are ordered by their keys. Heaps and b-tree use collection of pages within the structure and it's called allocation units. IN_ROW_DATA -> contains all data. LOB_DATA -> structure for large objects used to stored in xml, varchar(max), nvarchar(max), varbinary(max) … Continue reading How SQL Server stores data?
In a previous post I talked about transaction log works, and what about using a memory-optimized table? SQL Server has the feature Memory-Optimized Objects to improve performance. In-memory nonclustered indexes are implemented using a data structure called a Bw-Tree. A Bw-Tree is a lock and latch-free variation of a B-Tree. In-memory architecture: To enable an … Continue reading Memory-optimized Logging