Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 shrinking transaction log - once replicated

Author  Topic 

rohans
Posting Yak Master

194 Posts

Posted - 2004-07-31 : 16:24:54
I had replication on a databse once and then took it off.

When I try shrinking the tlog it does not work. I changed to simple recovery model and tried to truncate using
"backup log DBname with truncate_only" and then I got this error:
"The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed."

When I try the suggested SP (EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1)
I get another error: "Server: Msg 18757, Level 16, State 1, Procedure sp_repldone, Line 6
The database is not published."

Whatr can I do to resolve this. I must also add that the removal of the initial replication was not smooth, very tedious as something seemed corrupted.

All help appreciated.

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-01 : 15:02:30
Run a DBCC CHECKDB on the database to make sure you don't have any corruption. You might want to do this on msdb also while you're at it. After that, try running CHECKPOINT for the database in question, then running the shrinkdb again. I don't really think this will work though. :) Isn't that comforting. I don't suppose you have a backup do you? Seems to be a popular question today.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

rohans
Posting Yak Master

194 Posts

Posted - 2004-08-12 : 17:44:45
The shriknkdb did not change the log file size.

All help appreciated.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-13 : 03:56:47
Call MS Support?? 12 days is a long time to have an issue open like this. It's $250 per call. They work until it's resolved.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

rohans
Posting Yak Master

194 Posts

Posted - 2004-08-13 : 08:55:37
If I call then I will have to pay as the boss won't be happy. So let me think some more, although calling is my best option.

All help appreciated.
Go to Top of Page

pfousek
Starting Member

1 Post

Posted - 2004-09-16 : 14:44:29
I'm sure this is too little info too late.

But I had the same issue and error. As a work around, I creatd a new publication on the database with no subscribers. Then I was able to execute the sp_repldone command without getting the "database is not published" error.

apf
Go to Top of Page

rohans
Posting Yak Master

194 Posts

Posted - 2004-09-20 : 15:33:06
PFOUSEK - I tried it and it worked. Thank you for the information. The only test now is to see if it works from the job that are scheduled.

Thanks again

All help appreciated.
Go to Top of Page

rohans
Posting Yak Master

194 Posts

Posted - 2004-09-20 : 16:08:59
OOpps, The scheduled backup of the logs are now failing and I cannot say why,. I am running that script that Taga gave us which allows you to backup all databases. There is no reason for failure in the ERRORLOG. What do I do now????

All help appreciated.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-20 : 16:19:47
Run BACKUP LOG in Query Analyzer and post the error here.

Tara
Go to Top of Page

rohans
Posting Yak Master

194 Posts

Posted - 2004-09-20 : 16:29:08
Okay, I found it, it was the distribution database causing it. My script was trying to backup the log for this database. Iexcluded it and it seems ok now. Will watch and see and tell you tomorrow how the schedule jobs go.


All help appreciated.
Go to Top of Page
   

- Advertisement -