![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Old but important database, Transaction Log has grown quite large. Somewhere along the line we have lost the plot on how to correctly truncate the log. Nooo, we are not proper DBA's, first to admit it. So... I want to be in the situation that when a full back up is done the transaction log is truncated. I have set the *option 'Truncate on Checkpoint' on in the database options tab. I also want to save transaction logs every 20 minutes so that I can roll forward to within 20 minutes of now in the case of a disaster. Is there a whitepaper or something that shows how to safely configure SQLServer 7 to do this? thanks Bob |
#3
| |||
| |||
|
|
On Oct 19, 7:03*pm, bob <startatbob_cl... (AT) cutthis (DOT) adriley.co.nz wrote: Hi, Old but important database, Transaction Log has grown quite large. Somewhere along the line we have lost the plot on how to correctly truncate the log. Nooo, we are not proper DBA's, first to admit it. So... I want to be in the situation that when a full back up is done the transaction log is truncated. I have set the *option 'Truncate on Checkpoint' on in the database options tab. I also want to save transaction logs every 20 minutes so that I can roll forward to within 20 minutes of now in the case of a disaster. Is there a whitepaper or something that shows how to safely configure SQLServer 7 to do this? thanks Bob When you enable the 'Truncate on Checkpoint' option, it takes away your ability to make transaction log backups. Everytime the database checkpoints it wipes out any committed transactions in the transaction log, so your backup (if you could take on) would be missing transactions. If you disable this option and take regular transaction log backups, like you are saying, it should manage the size of your transaction log. Of course you also need to take regular full backups too (daily). In the event of a failure you would need to restore the full backup with no recovery option and then restore the appropriate transaction log backups. You should have the 7.0 books online installed. If you can't find that you could use the 2000 books online. Truncate on Checkpoint is called "simple recovery model" the concepts are mostly the saem. SQL Server 2000 backup and recover books online http://msdn.microsoft.com/en-us/libr...5(SQL.80).aspx Hope this helps you get started. |
#4
| |||
| |||
|
|
On Oct 19, 7:03*pm, bob <startatbob_cl... (AT) cutthis (DOT) adriley.co.nz wrote: Hi, Old but important database, Transaction Log has grown quite large. Somewhere along the line we have lost the plot on how to correctly truncate the log. Nooo, we are not proper DBA's, first to admit it. So... I want to be in the situation that when a full back up is done the transaction log is truncated. I have set the *option 'Truncate on Checkpoint' on in the database options tab. I also want to save transaction logs every 20 minutes so that I can roll forward to within 20 minutes of now in the case of a disaster. Is there a whitepaper or something that shows how to safely configure SQLServer 7 to do this? thanks Bob When you enable the 'Truncate on Checkpoint' option, it takes away your ability to make transaction log backups. Everytime the database checkpoints it wipes out any committed transactions in the transaction log, so your backup (if you could take on) would be missing transactions. If you disable this option and take regular transaction log backups, like you are saying, it should manage the size of your transaction log. Of course you also need to take regular full backups too (daily). In the event of a failure you would need to restore the full backup with no recovery option and then restore the appropriate transaction log backups. You should have the 7.0 books online installed. If you can't find that you could use the 2000 books online. Truncate on Checkpoint is called "simple recovery model" the concepts are mostly the saem. SQL Server 2000 backup and recover books online http://msdn.microsoft.com/en-us/libr...5(SQL.80).aspx Hope this helps you get started. |
#5
| |||
| |||
|
|
On Oct 19, 7:03*pm, bob <startatbob_cl... (AT) cutthis (DOT) adriley.co.nz wrote: Hi, Old but important database, Transaction Log has grown quite large. Somewhere along the line we have lost the plot on how to correctly truncate the log. Nooo, we are not proper DBA's, first to admit it. So... I want to be in the situation that when a full back up is done the transaction log is truncated. I have set the *option 'Truncate on Checkpoint' on in the database options tab. I also want to save transaction logs every 20 minutes so that I can roll forward to within 20 minutes of now in the case of a disaster. Is there a whitepaper or something that shows how to safely configure SQLServer 7 to do this? thanks Bob When you enable the 'Truncate on Checkpoint' option, it takes away your ability to make transaction log backups. Everytime the database checkpoints it wipes out any committed transactions in the transaction log, so your backup (if you could take on) would be missing transactions. If you disable this option and take regular transaction log backups, like you are saying, it should manage the size of your transaction log. Of course you also need to take regular full backups too (daily). In the event of a failure you would need to restore the full backup with no recovery option and then restore the appropriate transaction log backups. You should have the 7.0 books online installed. If you can't find that you could use the 2000 books online. Truncate on Checkpoint is called "simple recovery model" the concepts are mostly the saem. SQL Server 2000 backup and recover books online http://msdn.microsoft.com/en-us/libr...5(SQL.80).aspx Hope this helps you get started. |
#6
| |||
| |||
|
|
The database I restore as 'non operational allow more transaction logs' When I tried to restore the transaction log bck file Enterprise manager complained that the required LSN nnnnnn was missing because the transaction logs started too late. I then did a manual backup, figuring that the transaction log was already there so it can't complain about it starting too late. When I tried the restore this time it complained that the transaction log terminating too early and ask for a later log set. |
#7
| |||
| |||
|
|
bob (startatbob_clegg (AT) cutthis (DOT) adriley.co.nz) writes: The database I restore as 'non operational allow more transaction logs' When I tried to restore the transaction log bck file Enterprise manager complained that the required LSN nnnnnn was missing because the transaction logs started too late. I then did a manual backup, figuring that the transaction log was already there so it can't complain about it starting too late. When I tried the restore this time it complained that the transaction log terminating too early and ask for a later log set. Since you've restored a full backup which is later than the transaction log backups, the latter are of course of no use. You could take a new log backup and restore that. Hi Erland, |
#8
| |||
| |||
|
|
for your reply. So what is the correct way to set up if you want to take a full backup daily and have transaction logs backed up every say 20 minutes? To rehash; Currently I have two separate jobs. The full bck going off daily and the translog bck going off every 20 minutes. |
#9
| |||
| |||
|
|
bob (startatbob_clegg (AT) cutthis (DOT) adriley.co.nz) writes: for your reply. So what is the correct way to set up if you want to take a full backup daily and have transaction logs backed up every say 20 minutes? To rehash; Currently I have two separate jobs. The full bck going off daily and the translog bck going off every 20 minutes. If you don't know which backup is the last in the chain, restore all dumps with NORECOVERY. Then when you are done, do RESTORE DATABASE db WITH RECOVERY |
#10
| |||
| |||
|
|
I assumed that my log backup command (executes every 30 minutes) BACKUP Log Meteror TO DISK = 'H:\MeterorTrans.bck' was simply appending the transaction logs to the MeterorTrans.bck file therefore all logs being in order and available from this file. My full backup job (daily) BACKUP DATABASE Meteror TO DISK = 'H:\MeterorFull.bck' WITH FORMAT , NAME = 'Meteror Full' is overwriting its target bck file each time. So my assumption (which appears wrong) is that full bck is always occuring in the 'middle' of a contiguous series of transaction logs which have been appended, in order, to the MeterorTrans.bck |
|
I guess what I am looking for is simply: 1) The best practice for setting up a job or jobs for having a daily full backup and transaction logs stored every 30 minutes that can be used to roll forward. |
![]() |
| Thread Tools | |
| Display Modes | |
| |