Problem using @@DBTS between the primary and secondary in an AG

  • sherrerk

    Ten Centuries

    Points: 1165

    We have an ETL process set up that uses rowversion and had an issue last week because the ETL process was using the source database which had become out of sync, so I suggested they read the rowversion data from the secondary, and we have had strange problems since the change was put into place.  I can query @@DBTS on the source database (primary) and see it moving right along, but when querying on the readable secondary I see two odd things.  One the value is not moving at all, though I know it has moved looking at logs.  Two it is a larger value than on the primary.  I am starting to think that the value is not stored in the actual database, and if it is why would it not be synced with the primary? I tried changing the AG to synchronous just to see if anything happened and it didn't.  Does anyone have any insight to this issue?

  • Sue_H

    SSC Guru

    Points: 90011

  • sherrerk

    Ten Centuries

    Points: 1165

    Thanks for posting, the post explained the issue.  I had already had the team switch back to the primary to read the value and told them we would have to check the synchronization state of the AG.

Viewing 3 posts - 1 through 3 (of 3 total)

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