GO
Backup log TestDB to disk = 'D:testdb_log.trn'
Query retrieves backup
Step 2 - Copy the backup file to the destination server.
In this case we only have one physical server and two versions of SQL Server Instance, so we don't have to copy. But if two copies of SQL Server Instance are located in two different physical servers, then copy the following two files to the location on the secondary server, where DEVINSTANCE is installed .
Copy the backup file to the destination server
Step 3 - Restore the database with a backup file on the destination server by selecting norecovery.
For example.
Connect to SQL Server DEVINSTANCE and open a new query New Query. Write the following code to restore the database with the name TestDB, identical to the name of the original database. You can use a different name for Log Shipping configuration. Use the norecovery option to restore.
Restore database TestDB from disk = 'D:TestDB_full.bak'
with move 'TestDB' to 'D:DATATestDB_DR.mdf',
move 'TestDB_log' to 'D:DATATestDB_log_DR.ldf',
norecovery
GO
Restore database TestDB from disk = 'D:TestDB_log.trn' with norecovery
Restore databases with file saving
Refresh the database folder on the DEVINSTANCE server to see that the database has been restored TestDB with recovery status as shown below.
Database recovery status
Step 4 - Configure HA (Log Shipping / Mirroring) as shown below.
For example:
Right-click on SQL Server TestDB database TESTINTANCE (root server) and click Properties. The screen below will appear.
Configuring Log Shipping / Mirroring
Step 5 - Choose Mirroring or Transaction Log Shipping according to your needs and follow the steps provided by the system to complete the configuration.
Previous article: How to start and stop services in MS SQL Server
Next article: Report creation service in MS SQL Server