SQL Data Compare creates a large log file.
cirrussoftware
Posts: 3
I am moving data from an older database to a newer, after I run the data compare, the *_log.ldf is 2x larger than the *_data.mdf file. Is this normal and how can I reduce the size of the log file?
I am running SQL Express 2005.
I am running SQL Express 2005.
Comments
If you're changing a lot of data, yes, this doesn't sound too unusual. The reason for this is that with the default options, SQL Data Compare makes all changes within a transaction. This means that if anything goes wrong, it can roll everything back and leave the database as it was before the attempt.
You can disable the use of transactions in the project "Options" tab - under Synchronization Behaviour, there's an option for "Use transactions in SQL scripts". However, if an operation does fail, the database may be left partially synchronized.
Alternatively, there's documentation on how to shrink a log file that's grown beyond what you'd normally need at MSDN.
Hope that helps,
Robert
Red Gate