Truncate the log

  • Hi,

    I have copied Data and Logfiles from production to Test setup. Production is on Transactional repliction.

    At the test setup wheh i try to truncate the log am getting 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."

     

    I don't have replication copnfigured at the Test setup, i want to truncate the transaction log also.

    i have tried sp_repldone null,null,0,0,1 at the Test setup. this faild because test setup was not a publisher.

     

    I had similar situation before also and i have done dbcc rebuild_log which is very risky command and i don;t want to do that here now!!

     

    Cany anybody suggest me any alternate way to truncate the log at my test setup

     


    subban

  • You must stop the replication agent before you copy the database to the test server, after that make sure all log file in the production server has been restore in the copy of your database.

  • ok thankx..

    But can we do something on the test setup (that i have already copied??)

     


    subban

  • I think you must detach your database, after that delete the log file and then attach the database. (This way will create a new log file)

  • I think you must detach your database, after that delete the log file and then attach the database. (This way will create a new log file)

  • I have two log files . so it will not create new log files while attaching


    subban

  • please..................

    any solution for this ???


    subban

  • Delete one of your log file, so after that you can dettach and attach again your database with only one log file

  • I need to truncate my primary log file.......which i am not able to delete

     

     


    subban

  • Can you post the error message for sp_repldone?

    karl

    Best regards
    karl

Viewing 10 posts - 1 through 9 (of 9 total)

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