A Better way to sync a remote and local database?
Here is the deal, I HOPE someone can assist me in this. I have a SQL server database that is hosted through a company that wont allow me any replication or subscription services to sync my data to a local SQL server I have running. I have been attempting to come up with something on my own in order to at least have my remote data sync to my local copy in various intervals throughout the day. Here is what I have come up with so far but am looking for a better and more efficient way to do this. (And this isn't 100% functional at this point either):
BACKUP LOG DBname TO backup_device_name WITH INIT, NO_TRUNCATE
WAITFOR DELAY '00:00:05'
(this next step executes a stored procedure on the destination server that looks like this):
restore_Tiamat_ETS_log_backups AS
ALTER DATABASE Tiamat_ETS SET SINGLE_USER
RESTORE LOG Tiamat_ETS
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\logs\Tiamat_ETS_log_backup_dev ice.bak'
WITH
DBO_ONLY,
STANDBY = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\logs\undo_Tiamat_ETS.ldf'
WAITFOR DELAY '00:00:05'
GO
That is how far I am now but it isn't working how I would like. Any thoughts?
|