all groups > sql server replication > december 2003 >
You're in the

sql server replication

group:

Log Shipping with MSDE



Log Shipping with MSDE Iain
12/3/2003 10:18:50 PM
sql server replication: I'm trying to set up a warm standby between 2 Windows 2003 Web edition
servers running MSDE across the web.

The idea is to do a DB backup once a week , ftp the file to a backup FTP
server, then ftp it up to the warm standby server and restore it.

Then, each our do much the same with a log backup.

The idea being that the intermediate server will provide an 'offsite' backup
in case of disaster.

It's a bit like simple log shipping in the resource kits, but with FTP
between the sites.

And it works. Well, the patient is not surviving, but the code is working!

The problem seems to be that when the first log is restored the remote
server complains that there was a previous one.

This even occurs after I do the backup and restore manually, haveing deleted
the original database.

'Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
Server: Msg 4305, Level 16, State 1, Line 1The log in this backup set begins
at LSN 6000000010200001, which is too late to apply to the database. An
earlier log backup that includes LSN 5000000046600001 can be restored.'

If there's a commercial program, I'll buy it (if it's not to expensive!)
this has already taken too long (though I'd like to get it going, I've still
got to write the main controller).

Iain

Log Shipping with MSDE Allan Hirt
12/4/2003 6:17:10 AM
You're applying the transaction logs out of sequence it
appears, since it's expecting the next logical LSN in the
transaction log file.


The databases must start at the same point ONCE, and then
all you do is transaction log backups. If you're
restoring the full once a week, you need to basically
reinit log shipping or fix your process to account for
this and look for the right log file.

You could always take the version of log shipping in the
SQL 2K High Availability book and customize it.

[quoted text, click to view]
Re: Log Shipping with MSDE Iain
12/4/2003 2:26:42 PM
Thanks, Allan.

'reinit log shipping' ?

As mentioned it's my own hack (oops code) - I'm not using any of the SQL
Server log shipping options and I'm not sure what yo umean by reinit. Is
this a restore log or restore database option?

Can the log shipping be configured to use FTP? Or is there a way of
specifying a share across the internet (I'm sure something with IPSEC could
be done, but, so many components, so little time!)?

Iain
[quoted text, click to view]

Re: Log Shipping with MSDE Allan Hirt
12/5/2003 7:08:05 AM
Whether it is your own version of coded log shipping
(which I have done as well), or the stuff which only comes
with SQL 2K EE, if you are doing what you say, you will
have to start all over (i.e. reinitialize things). Log
shipping is meant to start from a single point in time DB,
and then just have the transaction logs applied, not
restore the main DB all the time.

As long as you can code it, you can do FTP, but you'd have
to do it through xp_cmdshell
[quoted text, click to view]
Re: Log Shipping with MSDE Iain
12/8/2003 12:03:22 PM
Thanks for this. I go it working (though I'm not quite sure WHY).

the trick seems to be to use the correct flags with the restore and backup.
The backup of Database and Log needs to be WITH INIT and the REstore of the
Log also with REPLACE.

Maybe only one of these fixes the issues, but I don't care. The components
work.

(I've yet to run a system test - I was happy to get the main procedure to
'compile').

Iain

[quoted text, click to view]

AddThis Social Bookmark Button