0

I have set up log shipping between 2 SQL Servers (SQL Server 2008 and SQL Server 2012),

At first i took a full backup of the first one and restored it on the other one and than i set up the log shipping,

The databases first backup-restore took a few hours and i wish to know:

  • how does the log shipping process knows from when to start the logs it is shipping? does it start from when the last backup-restore process happened or from the moment the log shipping itself is set ?
  • Can i be sure that no information was lost in these few hours ?

Thanks

0

2 Answers 2

1

The way log shipping works is by taking the data written to the log file and writing it to a file. The database log is written sequentially and has an ID (log sequence ID) associated with each entry. When a transaction backup is taken, it starts with the next LSN after the last backup. When the backup completes, an entry is written to the database that states the start and end of the backup.

LSN Explained: http://msdn.microsoft.com/en-us/library/ms190411(v=sql.105).aspx

For example:

LSN

1 -> Start of log backup #1

2

3

4 <- End of log backup #1

5 -> Start of log backup #2

6

7 <- End of log backup #3

8

9

1

You can use log shipping to send transaction logs from one database (the primary database) to another (the secondary database) on a constant basis. Continually backing up the transaction logs from a primary database and then copying and restoring them to a secondary database keeps the secondary database nearly synchronized with the primary database.

Here is the answer of your questions - If configured correctly then log shipping software start from the point the last backup-restore process happened - The Answer of your second question is really depends upon how you configure it.

As we are using red gate software and we are taking backup after every 15 minutes and in this way we can lost maximum of 15 minutes of data, as the secondary database nearly synchronized with the primary database.

hopw it will help.

You can read more Monitor Log Shipping

Not the answer you're looking for? Browse other questions tagged or ask your own question.