Transaction Log Won't Shrink

  • No idea what cuased it.. but try to run the following and see it resolves...

    EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1

    MohammedU
    Microsoft SQL Server MVP

  • When I execute that stored procedure, I get the following message:

    Msg 18757, Level 16, State 1, Procedure sp_repldone, Line 1

    Unable to execute procedure. The database is not published. Execute the procedure in a database that is published for replication.

    Do you have any other suggestions?

    Thanks.


    Wendy Schuman

  • Did you run the procedure in the same db where you have the issue...?

    MohammedU
    Microsoft SQL Server MVP

  • Yes, I did. I don't really understand what's going on here, but I did find these posts. Although it seems that the bug they're referring to was happening in RTM and SP1. We're on SP2.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=959032&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=654902&SiteID=1

    I guess I'll try their workaround. Luckily, we have the same issue on both our QA site and Production sites, so I can test on QA. Although, QA is set up in Simple recovery model. At this point, I don't know what else to do.

    Thanks.


    Wendy Schuman

  • I was able to fix my problem by doing the following:

    exec sp_removedbreplication 'dbname'

    Backup the log file

    Execute DBCC SHRINKFILE

    The log_reuse_wait_desc now says 'NOTHING' and I was able to shrink the log file.

    It's still a mystery as to how it got set to 'REPLICATION' in the first place though.


    Wendy Schuman

Viewing 5 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply