Database Recovery

How to Deal with Unique Keys in SQL Server Replication Errors

Replication errors will have a key with which we should identify the missing row from the subscriber. We must then manually copy those records from Publisher and then insert into the subscriber. While doing this activity, we would have to turn off and turn on the identity column. In this article, we will learn how to deal with Unique keys in a replication. Missing data: Consider that you had initialized a subscription without a snapshot by using options like initialize with backup or...

Read more »

How to Copy the Schemas & Statistics of Multiple Databases without Data via TSQL

With the service pack 2 of SQL Server 2014, you can create a copy of a user database without the actual data. i.e., you would be creating just the schema and statistics of your source database. In this article, we will learn how to quickly create clone of multiple user databases A copy needed for investigation: To find the root cause of a performance problem, you might need a copy of your existing database. In such cases, you can use the following query to create copies of multiple SQL Server...

Read more »

How to Fix Inactive Connections to Your Primary Replica in SQL Server

You might have added databases to your always-on group. When you use multi-subnet cluster and set up SQL Server Always On, you might receive an error message stating that the connection to your primary is inactive. In this article, we will learn how to fix that and synchronize databases participating in Always On. Using Wizard or script SQL Server always-on availability group can be created using the new availability group wizard or a TSQL script. One common reason that the action might fail...

Read more »