Troubleshooting Transactional Replication – part 1

The common way to replicate data and objects from one server to another is using transactional replication. As you know, SQL Server processes all actions within the database using Transact-SQL statements. Each completed statement is called a transaction. In transactional replication, each committed transaction is replicated to the subscriber as it occurs. "Sometimes" can occur a problem and the process don't work accordingly. The … Continue reading Troubleshooting Transactional Replication – part 1

How update works in transactional replication?

In a post about how update works I showed what happened when run an update with the same values. SQL Server is smart enough to see that and not changing anything and register minimum log. Another day I saw a comment to avoid updating records when none of the values are changing. Avoid updating records when … Continue reading How update works in transactional replication?

Database migration methods

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

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

How SQL Server stores data?

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?