Experts Round Table Network
Navigate
Home
ArticleWiki
Forum
Newsletter
Links
Tech News
Welcome Guest.
Username:
Password:
Remember me
Forgot your password?
Register
A conversation on Backups, part 1...level: beginner
Welcome,
Guest
. Please
login
or
register
.
February 07, 2012, 05:38:33 AM
11513
Posts in
1262
Topics by
496
Members
Latest Member:
Beerdernill
Home
Help
Search
Login
Register
Experts Round Table Network
|
Databases
|
MS SQL Server
|
A conversation on Backups, part 1...level: beginner
« previous
next »
Pages:
[
1
]
Print
Author
Topic: A conversation on Backups, part 1...level: beginner (Read 827 times)
Kevin3NF
Moderator
Offline
Posts: 12
A conversation on Backups, part 1...level: beginner
«
on:
January 19, 2006, 09:43:08 AM »
This topic is primarily aimed at the new SQL Server DBA, or someone installing a 3rd party product that uses SQL Server as a back-end storage mechanism.
Sr. DBAs know all this by heart, but feel free to contribute.
The goal here is to gather input from anyone that reads it and turn the thread into ERT static content.
Lets start with the basics:
1. Why Backup?
*your server died
*you lost a hard drive
*your database became corrupted
*you need to refresh a dev/test environment.
2. What if I don't backup?
* As the company DBA, you bear primary responsibility for ensuring you can recover the data, so in a worst case scenario failure to backup may become a "resume generating event" for you.
* Best case, your network team may have done a backup you are not aware of, such as Veritas netbackup or some other utility
3. How often should I backup?
* It depends. The frequency of backups varies widely based on a number of factors
-Database size - 2 TB takes a lot longer than 2GB
-Available space for the backup files - drives vs. tape
-time it takes to do the backup - hours vs. minutes
-tolerance for dataloss - could be days or seconds or even none
-read-only, or read-write data?
-others
*most of my clients start with a Full backup daily and transaction logs throughout the day at various intervals depending on the amount of activity. If the database size makes full backups cumbersome and affects performance, you may need to look at a FUll/Differential/T-Log strategy
4. Recovery Model
Recovery model is simply a setting that determines how much you are able to recover in the event you need to restore.
*Full - all logged operations stay in the Transaction Log until the t-log is backed up
*Simple - all transactions are logged, but purged from the T-Log after being committed to the database (more accurately, they are purged at the next checkpoint)
*Bulk-Logged - certain bullk operations (Select Into, bcp, etc.) will have to be re-run as they are not fully logged...just the fact that the operation happened is logged.
That said, here is the summary I give my clients:
Use Full recovery model on any read/write production db, and Simple on any read-only or dev/test user databases.
System databases are in Simple recovery model by default.
5. How do I backup?
***See Books Online***
The Basic, simplest syntax is:
BACKUP DATABASE MyDatabase
TO DISK = 'C:\MyDatabase.bak'
You can use Enterprise Manager, but over time you need to know the t-SQL syntax well as there is bound to be a time where EM is not available and you are using Query Analyzer or osql to backup your database.
Feel free to add comments, correct me where I err or suggest additional info.
This pertains to SQL Server 7.0 and 2000. I have not yet worked with 2005.
Kevin3NF
Logged
For the love of Pete...include the version of the software you are using in your question :-)
Pages:
[
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
ERT 1.5
-----------------------------
=> Round Table Learning Center
=> Bug reports
-----------------------------
Legacy
-----------------------------
=> The next level
=> History of ERT
-----------------------------
Community Affairs
-----------------------------
=> Introductions
=> Ballot Box
===> Closed Polls
=> Soapbox
===> 2006
=> Propose and Consult
===> Propose and Consult...CLOSED
-----------------------------
Bits and Bytes
-----------------------------
=> Tips, Tricks, Snippets, Tidbits And General Pearls Of Wisdom
-----------------------------
Serverside Technology
-----------------------------
=> PHP
=> ASP
-----------------------------
Webservers
-----------------------------
=> Apache
=> IIS
-----------------------------
Databases
-----------------------------
=> MySQL
=> Access
=> MS SQL Server
-----------------------------
Clientside Technology
-----------------------------
=> HTML
=> CSS
=> Javascript
=> Flash
=> WAP/WML
-----------------------------
Web Technologies
-----------------------------
=> General Web Dev
=> Web Standards
=> XML
=> Online Marketing
-----------------------------
Graphics
-----------------------------
=> Graphics Design and Animation
-----------------------------
Programming
-----------------------------
=> .NET
=> JAVA
=> MS DOS Batch Scripting
=> Mathematics
=> C & C++
=> VB
=> Delphi
=> Algorithm design
-----------------------------
Operating Systems
-----------------------------
=> Windows (General)
=> NT Based (2K, 2K-03, NT, XP, Vista)
=> Open Source (All)
-----------------------------
Hardware
-----------------------------
=> Hardware General
===> 2006
===> 2007
=> Gamers Hardware (Advanced)
-----------------------------
Networking
-----------------------------
=> Home (small)
=> Office (large)
=> Internet
-----------------------------
Security
-----------------------------
=> General Security Issues
-----------------------------
Rants/Opinions/Proposals
-----------------------------
=> Site operation
Powered by SMF 1.1 RC2
|
SMF © 2001-2005, Lewis Media
Joomla Bridge by
JoomlaHacks.com