wyrd Posted June 3, 2003 Posted June 3, 2003 Okie dokie, I went ahead and started to toy with backups, but I found that backing up a log requires Full Recovery model. Hrm. Well, I'm backing up a database for a small business (fictitious as this is just me messing around, but that's beside the point, let's assume I really am) and wanted to know if backing up the log is should be something I do, or is it not to important with a small business thats info is probably updated only once a day at most? As I'm understanding this, Simple Recovery model allows just database backup, and database recovery is to just recover data to the point of last backup of the db. Full Recovery model allows db and log backup, which includes Simple Recovery but also allows log recovery, which can recover data from a certain point time. If I should be using Full Recovery model, how do I set this for the db I'm using? Please keep in mind that I'm using MSDE and Server Explorer that comes with .NET Professional, so I'll probably have to do this through osql. Thanks in advance. Quote Gamer extraordinaire. Programmer wannabe.
Administrators PlausiblyDamp Posted June 3, 2003 Administrators Posted June 3, 2003 (edited) Generally speaking if the database undergoes few updates then the log itself will remain fairly small and as such the increased disk space is minimal. In a production environment backing up the logs can give a much more recoverable system. Take the scenario where logs are kept seperate from data (ideally seperate physical disks or raid arrays) OS on C: Data on D: Logs on E: if the data is backed up at midnight (Full backup) all data is backed up and logs are purged. work progresses through the day (no further backups) and a disk fails at 15:00 if the disk that fails holds the logs then all the data is still safe on D: if the disk that fails is the Data then last nights backup holds everything up to the start of the day and the Logs (E: ) hold all changes - either scenario results in minimal to no data loss. I can't remember the exact command of the top of my head to change this but it uses the sp_dboption procedure. Hope that helps a bit. the E: bit was turned into a smilie Edited June 3, 2003 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
wyrd Posted June 3, 2003 Author Posted June 3, 2003 Thanks for the response. My question wasn't really what log backups vs db backups were (as I already knew the difference) but whether or not log backups were needed for a small business app. As for changing the db model, I found the answer (I didn't see any option for this under sp_dboption); ALTER DATABASE dbname SET RECOVERY FULL Quote Gamer extraordinaire. Programmer wannabe.
Administrators PlausiblyDamp Posted June 3, 2003 Administrators Posted June 3, 2003 Teach me to read the question properly ;) And you were right about the sp_dboption thing (bad day and I was away from anything with SQL 7 or better on it - did have SQL 6.5 handy though) I would tend to always use full backups every night (if possible) as this makes restores reasonably easy. As to log backups - depends on how many updates occur - if as in your example one or two a day probably not. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.