Sunday, February 12, 2012

Backup Transaction fails.

Hi,
I have taken a back up of a database that was under transactional
replication and was the subscriber. I have restored the backup on to another
server as a stand alone database (no replication what so ever).
I am now trying to truncate the transaction log as its taking a whole lot of
space on the disc and want to shrink the file.
I issue the following statement:
BACKUP LOG <databaseName> WITH NO_LOG
when i issue this statement it comes out with the following 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.
Is there any way I can get around this and truncate the log file?
Thanks
Vikram
Vikram,
try:
EXEC sp_repldone @.xactid = NULL, @.xact_segno = NULL, @.numtrans = 0, @.time
= 0, @.reset = 1
then truncate the log.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul,
I executed that procedure and came up with the following:
Server: Msg 18757, Level 16, State 1, Procedure sp_repldone, Line 1
The database is not published.
Any clues?
Cheers
Vikram
"Paul Ibison" wrote:

> Vikram,
> try:
> EXEC sp_repldone @.xactid = NULL, @.xact_segno = NULL, @.numtrans = 0, @.time
> = 0, @.reset = 1
> then truncate the log.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||One idea I'd try is to publish the database in TR, run the script, truncate,
then drop the publication.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks very much Paul.
It worked.
thanks a lot.
Cheers
"Paul Ibison" wrote:

> One idea I'd try is to publish the database in TR, run the script, truncate,
> then drop the publication.
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
>

No comments:

Post a Comment