DDL Checksum or Similar Technique

  • Hello!

    Is anyone familiar with a way to verify the DDL for objects being log shipped? I mean, is there a way to compare the DDL for Table A on Server 1 to the DDL for Table A on Server 2 ( where Server 1 log ships to Server 2)? Of for any other object? I could do this in a very round-about way, using binary_checksum on a row that should be the same in both Server 1 and Server 2. However, according to BOL

    "... BINARY_CHECKSUM(*) will return a different value for most, but not all, changes to the row, and can be used to detect most row modifications."

    Full article: http://msdn.microsoft.com/en-us/library/ms173784.aspx

    I'm worried that the binary_checksum won't cut it for an accurate check. Does anyone have any ideas or tecniques for accomplishing this? The higher-level purpose is to have more in-depth monitoring of log shipping.

    Thanks in advance!

  • What are you worried about? You are doing a backup and restore. The DDL is the same, or it is once the secondary has caught up to the primary.

    You can do the log restores WITH STANDBY and query the db if you are worried.

  • That makes sense. I'm told that it's happened at my current employer that some column additions haven't made it over to the secondary server. I'm not sure how this would have happened. So, I'm just trying to cover my bases on making sure everything is in tip top shape.

    Thanks!

  • If the logs didn't get restored, they wouldn't be there. Sometimes people delay logs by time, so check that first.

    If log shipping is running, the changes move. No way they don't move unless the change isn't committed on the primary.

  • Sounds good, thanks Steve.

Viewing 5 posts - 1 through 4 (of 4 total)

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