Sql-server – Backup from Server1 and restore it to Server2

merge-replicationreplicationsql-server-2008

IF we have two Servers installed with SQL Server 2008 instances,
Server1 has three drives C, D and E with 100, 500 and 500 GB respectively
and Server2 has three drives C, D and E with 100, 300 and 300 GB respectively.
Now you have database1 on Server1 with data file 250 GB on D drive and Log file 350GB on E drive, its recovery model is full and replication has been setup
on this database, what is the best way to take backup from Server1 and restore it to Server2?

Problem is server2 has 300GB space but on Server1 has 350GB log file.

Best Answer

It's a little bit strange to have log file bigger than data file. I guess you didn't take a backup for long time and that is a reason for such a huge log file.

First try with this link: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/633ea08c-942d-4703-bc03-f2befd35f612/log-file-size-keeps-growing-replication?forum=sqlreplication

The simplest solution is log backup, log backup should reduce the size of file.

If that fails you can try to truncate log file (see dbcc command). However, you should use this as a last resort since truncation of log file is "quick and dirty" solution.