Link to home
Start Free TrialLog in
Avatar of gardmanIT
gardmanIT

asked on

SQL recovery model and merge replication

Hi All,

I have a database that I wish to temporarily change the recovery mode on to simple so that I may forcefully shrink the transaction log(due to maintenance tasks screwing up and not reducing the file)

My question is :-

Can i change the recovery model to simple without breaking the merge replication on this database?? Then change it back to full?

Server : SQL 2008 server
Compatability level : SQL server 2000 (80)
Recovery model currently : Full
ASKER CERTIFIED SOLUTION
Avatar of jjjosef
jjjosef
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gardmanIT
gardmanIT

ASKER

Thank you.. it got to 185Gb and I dont have the spare room to get that down.. i assume to get that down "normal way" I would just backup the transaction log and then do a shrink returning freed space to operating system..??

I am going to run the following command out of hours...



-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE KLSTOCK
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (KLSTOCK_log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE KLSTOCK
SET RECOVERY FULL;