Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Large Log File

3 views
Skip to first unread message

Nighthawk

unread,
Aug 11, 2010, 7:14:08 AM8/11/10
to
Hello,

i have a merge replicated database (3 GB) with a log file that grown to 38
GB.
The recovery Model is simple.

DBCC Shrinkfile doesnt works.

DBCC OPENTRAN say:

Replizierte Transaktionsinformationen:
Oldest distributed : (0:0:0)
Oldest non-distributed LSN : (297400:25:1)

What can i do, to shrink the log file?

Thanks

Nighthwak


William Allison

unread,
Aug 11, 2010, 8:23:34 AM8/11/10
to
I don't have much experience with replicated databases, but I wrote this script that I run on test databases to shrink the logs. Hope it helps. (I use the variables so I don't have to modified it, just change the database which the query is running against)


DECLARE @logname NVARCHAR(50)
DECLARE @name NVARCHAR(50)
SET @name = db_name()
SET @logname = (SELECT name FROM sys.database_files WHERE [file_id] = 2)

DBCC SHRINKFILE(@logname, 1)
BACKUP LOG @name WITH TRUNCATE_ONLY
DBCC SHRINKFILE(@logname, 1)

Submitted via EggHeadCafe - Software Developer Portal of Choice
Scrolling in WPF Toolkit?s Column Chart
http://www.eggheadcafe.com/tutorials/aspnet/0939d60c-8e17-4a27-b898-1fc772d2d6f6/scrolling-in-wpf-toolkits-column-chart.aspx

Nighthawk

unread,
Aug 11, 2010, 12:20:57 PM8/11/10
to
Hello,

the skript does not function. The Size does not change.

Nighthawk

"William Allison" <william...@hotmail.com> schrieb im Newsbeitrag
news:201081182...@eggheadcafe.com...

0 new messages