![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am new to this tool and have a general question. Is it possible to set up a SQL Maintenance Plan that guarantees an atomic backup of a set of several databases? It is imperative that both the full backups and the transaction logs be backed up atomicially because there are dependencies between the databases. If not, what is the best way to handle this requirement? -- Sophie Bunce |
#3
| |||
| |||
|
|
I don't know what you mean by Atomically when it comes to the FULL and Log backups. They are two different animals with different purposes. A FULL backup does include a tiny log backup in it for recoverability reasons if you don't apply any log backups when you restore. The FULL backup is Atomic in that it is a complete snapshot of the db at the time the backup completes with data integrity ensured by rolling back or forward any in flight trans as needed when it is restored. If you need to get a point in time view then you do need to have log backups of the db as well and you can then specify a point in time to recover to. If you are referring to multiple dbs that all need to be backed up at exactly the same time it doesn't work that way. They finish when they finish. However you can add a marker to the transaction logs in each of the dbs and then do a restore of the logs using the STOPATMARK option to get them all to a relatively consistent state but I don't think it is guaranteed to give exact results due to timing issues of when it is applied. See RESTORE in BOL for more details. -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Sophie Bunce" <SophieBunce (AT) discussions (DOT) microsoft.com> wrote in message news:8E79EF2E-9920-4E16-8112-846080A2971A (AT) microsoft (DOT) com... I am new to this tool and have a general question. Is it possible to set up a SQL Maintenance Plan that guarantees an atomic backup of a set of several databases? It is imperative that both the full backups and the transaction logs be backed up atomicially because there are dependencies between the databases. If not, what is the best way to handle this requirement? -- Sophie Bunce |
#4
| |||
| |||
|
|
Andrew, Thank you for your response. By "atomic" I mean "as a unit". (The term comes from a critical section in code thas has to all be executed as a unit before giving a timeslice to another process.) In other words, I need to be able to restore ALL 12 TFS databases so that the end result is that they are restored to a specific point in time. I had already been wondering if marking them and restoring them to the mark using marking and then STOPMARK. Couldn't you ensure that the result is perfect IF you use a transaction to mark all 12 databases. (i.e. Begin the transaction, mark all 12 databases, end the transaction), and then when you restore you can restore them all to the same mark. At least the documentation I've read seems to suggest this. However, I'm not a DBA, so I could be mistaken. Now that you understand my question a bit better, does a SQL maintenance plan in which you select a set of several databases guarantee that they will be restored to the same point in time? It sounds like the answer is no. Could you confirm? If then answer is no, then we will abandon SQL maintenance plans for this particular backup and will script it using these transaction marks. Sophie Bunce "Andrew J. Kelly" wrote: I don't know what you mean by Atomically when it comes to the FULL and Log backups. They are two different animals with different purposes. A FULL backup does include a tiny log backup in it for recoverability reasons if you don't apply any log backups when you restore. The FULL backup is Atomic in that it is a complete snapshot of the db at the time the backup completes with data integrity ensured by rolling back or forward any in flight trans as needed when it is restored. If you need to get a point in time view then you do need to have log backups of the db as well and you can then specify a point in time to recover to. If you are referring to multiple dbs that all need to be backed up at exactly the same time it doesn't work that way. They finish when they finish. However you can add a marker to the transaction logs in each of the dbs and then do a restore of the logs using the STOPATMARK option to get them all to a relatively consistent state but I don't think it is guaranteed to give exact results due to timing issues of when it is applied. See RESTORE in BOL for more details. -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Sophie Bunce" <SophieBunce (AT) discussions (DOT) microsoft.com> wrote in message news:8E79EF2E-9920-4E16-8112-846080A2971A (AT) microsoft (DOT) com... I am new to this tool and have a general question. Is it possible to set up a SQL Maintenance Plan that guarantees an atomic backup of a set of several databases? It is imperative that both the full backups and the transaction logs be backed up atomicially because there are dependencies between the databases. If not, what is the best way to handle this requirement? -- Sophie Bunce |
#5
| |||
| |||
|
|
By "atomic" I mean "as a unit". (The term comes from a critical section in code thas has to all be executed as a unit before giving a timeslice to another process.) In other words, I need to be able to restore ALL 12 TFS databases so that the end result is that they are restored to a specific point in time. |
#6
| |||
| |||
|
|
I am new to this tool and have a general question. Is it possible to set up a SQL Maintenance Plan that guarantees an atomic backup of a set of several databases? *It is imperative that both the full backups and the transaction logs be backed up atomicially because there are dependencies between the databases. * If not, what is the best way to handle this requirement? -- Sophie Bunce |
|
I am new to this tool and have a general question. Is it possible to set up a SQL Maintenance Plan that guarantees an atomic backup of a set of several databases? It is imperative that both the full backups and the transaction logs be backed up atomicially because there are dependencies between the databases. If not, what is the best way to handle this requirement? -- Sophie Bunce |
![]() |
| Thread Tools | |
| Display Modes | |
| |