SQL Server Performance

transactional replication-Log reader

Discussion in 'SQL Server 2008 General DBA Questions' started by ismailadar, Dec 21, 2010.

  1. ismailadar New Member

    Hi all again,
    I have configure transactional replication between two database.disturbitoun publisher and subscriber databases locate at the same instance.After instalation completed i opened replication monitor to test replication.But i recognize log reader agent seems does not work and i configured a new profile and increased querytimeout value. Now replication works but when i open replicaiton monitor log reader still seems does not work after i fress refresh button three or more times it turns green and seems , works.But when i update an article from publiser database the modification is replicated to the subscriber but i wonder about why log reader agent seem as if it does not work untill i press refresh button three or more times?
    is it a bug?
    thank in advance
  2. SQLTentMaker New Member

    Most likely not a bug. What is the error that you are seeing in LogReader agent history?
  3. ismailadar New Member

    i have just looked at log reader agent history and i noticed there is a strange error log :
    The process could not execute 'sp_repldone/sp_replcounters' on ServerName
    i googled it but i can not find solution?
  4. ismailadar New Member

    hi all,
    I have found solutiondbcc
    opentran('dbname') --which shows me that the old LSN was slightly out of dategosp_replflushgosp_replrestartgo
    dbcc
    opentran('dbname')go
    can you explain above commands step by step?
  5. SQLTentMaker New Member

    There was some sort of out of sync issue that logreader was seeing. According to BOL:
    sp_replflush - "Article definitions are stored in the cache for efficiency. sp_replflush is used by other replication stored procedures whenever an article definition is modified or dropped."
    sp_replrestart - "Used by transactional replication during backup and restore so that the replicated data at the Distributor is synchronized with data at the Publisher. This stored procedure is executed at the Publisher on the publication database."
    So, my question would be how did you create the subscriber? With a backup? If so then this would make sense.
    Regardless, glad you were able to figure it out.
  6. ismailadar New Member

    thanks for your interest i have also read about SP on BOL. When i create subscriber i back up pubisher and restore it before installing replication.
    Is there any difference between between restoring from back up or creating new database?
  7. satya Moderator

    Both are similar actions, the ease with RESTORE is that you need to specify where the data & log files needs to be placed irrespective of databases that are created.
  8. ismailadar New Member

    thanx for your replies :)
  9. satya Moderator

    Are you using SQL SErver 2008 R2 management studio to monitor the replication for SQL2008 instances?
    I have had similar issues in using as GUI tools are flaky sometimes having such problems. If there is no error reported from replication log or no issues with the snapshots then I would simply ignore at this time.
  10. ismailadar New Member

    no i am using SQL server 2008 management studio to monitor the replication anyway it works fine :)

Share This Page