how to maintain integrity between databases when backing up

  • I encountered a problem and not sure how to solve it, so I ask you guys for help.

    At the application layer, many operations involve two or more databases. So that means the integrity between databases is also important. Currently our full backup operations are done by jobs every midnight. Let say the database A and B have to be maintained synchronously in order to get the integrity between them. If backup of database A start at 00:00 and end at 00:10. Now start to backup database B. If someone modified database B at 00:15 and backup of B end at 00:20. Now the data in backup files of A and B are not in a proper state, they don’t have integrity between them, right? If so, how to solve this problem?

    Another similar question is, if the developer asks you to restore just one database, what should you do? since you don’t know whether there are other databases are “related” to this database, you restore just this database or restore all databases on the instance?

  • We have the same situation and basically rely on the logs as a mechanism to restore to a precise point in time. That's the best that can be achieved. If you need tighter coupling than that, you need to combine the databases or at least the sets of data that require that tighter coupling.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • If the developer asks you to restore just one database then you can go ahead restore one datbase for him and later on you can restore the changes made by him.In this cas if the Developer is asking to restore only one database then he will work on that datbase only and if he see any dependiencies on another database then he should ask to you restore that too.

    The point is you don't need to restore all the databases on the instance.

  • prakskarry (7/22/2010)


    If the developer asks you to restore just one database then you can go ahead restore one datbase for him and later on you can restore the changes made by him.In this cas if the Developer is asking to restore only one database then he will work on that datbase only and if he see any dependiencies on another database then he should ask to you restore that too.

    The point is you don't need to restore all the databases on the instance.

    I think you missed the point. There are cross-database dependencies. Restoring one database makes the data in the other broken.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

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

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