SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
What is your SQL Server backup strategy? | TechRepublic



   ZDNet Asia    SmartPlanet    TechRepublic                                                                                      Log In    Join TechRepublic    FAQ        Go Pro!




                                                   Blogs     Downloads        Newsletters       Galleries        Q&A   Discussions         News
                                               Research Library


     IT Management             Development         IT Support        Data Center         Networks         Security




     Home / Blogs / The Enterprise Cloud                                                  Follow this blog:

     The Enterprise Cloud


     What is your SQL Server
     backup strategy?
     By Steven Warren
     August 28, 2007, 9:00 AM PDT

     Takeaway: Most database administrators (DBAs) know what it’s like to be called away from
     home or dinner or even awakened in the middle of the night to answer a page or a cell-phone call
     concerning some type of database disaster. These are the times you’re glad that you have a
     systematic backup plan. Of course, conversely, [...]

     Most database administrators (DBAs) know what it’s like to be called away from home or dinner or
     even awakened in the middle of the night to answer a page or a cell-phone call concerning some
     type of database disaster. These are the times you’re glad that you have a systematic backup
                                                                                                                             MapR Hadoop
     plan. Of course, conversely, if you don’t have a good backup plan, these are the times you regret
     it.                                                                                                                     Download
                                                                                                                             Most Open, Enterprise-Grade Distribution for
     In this article, we will discuss various types of backup strategies and demonstrate how to                              Hadoop. Try Now.
     implement each of these types of backups using Enterprise Manager, the graphical user interface                         www.mapr.com/Free-download
     (GUI), and Transact SQL (T-SQL) in Microsoft SQL Server 2000.                                                           Google Docs For Business
                                                                                                                             Start with 5 GB of Included Storage Get
                                                                                                                             Additional 20 GB Just $4/month!
                                                                                                                             www.google.com/apps
     Put together a backup plan
     Before developing your backup strategy, you need to develop a plan of action. Evaluate your
                                                                                                                             Data Masking Software
                                                                                                                             Secure your sensitive data with Grid-Tools'
     company and ask, “What is the maximum amount of downtime we can live with?” Once this is
                                                                                                                             Enterprise Data Masking
     established, you can decide on the appropriate course of action by matching your company’s
                                                                                                                             www.grid-tools.com
     needs to the appropriate level of database backup.

     Full backups
     A full backup is the easiest type of backup to implement in SQL Server. It takes a complete picture                Keep Up with TechRepublic
     of your database that includes backing up users and permissions. In addition, this backup can
     occur while transactions are still occurring in your system. When the backup begins, the date is
     recorded, the data pages are backed up, and all transactions that occur while the backup runs are
     appended to the backup.
                                                                                                                         
                                                                                                                              Five Apps
     Author’s note                                                                                                       
                                                                                                                              Google in the Enterprise
     A full backup backs up your users but not your logins. If you want to back up your logins,
     remember to back up the Master database. Furthermore, if you ever restore your database to a                            Subscribe Today
     different server, you must synchronize your logins by using the sp_change_users_login. For a
     more detailed explanation of this stored procedure, see SQL Books Online.
                                                                                                                        Follow us however you choose!
     Using Enterprise Manager




http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]
What is your SQL Server backup strategy? | TechRepublic



     To implement a full backup using Enterprise Manager, expand the SQL Server to display your
     databases. Right-click on the database and select All Tasks | Backup Database to access the
     options shown in Figure A.

     Under Backup, choose Database - Complete. Then, select a destination (tape or disk). If this is the
     first backup of your database, you will have to create a backup device or file. A backup device is          Media Gallery
     simply a location that stores your backups. A backup file can also hold multiple “backups.” To
     create a backup device or file, start by clicking Add. Next, select either File Name or Backup
     Device. (Figure B shows the dialog box you’ll see if you choose Backup Device.) Then, just
     define the appropriate path and click OK. Once you’ve created the device or file, you can select it
     from the Destination list box.

     The SQL Server Backup dialog box also includes options to append to a backup or overwrite it.                     PHOTO GALLERY (1 of 15)
     This means that you can add multiple backups to your file or device or overwrite previous backups                 Curiosity's autonomous
                                                                                                                       'seven minutes of...
     with the most current one. If you want to schedule your backups, select the Schedule check box
     and then click the button that has three dots on it. In the Edit Schedule dialog box, shown in                          More Galleries »
     Figure C, make your scheduling specifications.

     You can choose from the following options:

        Start Automatically When SQL Server Agent Starts
        Start Whenever CPU(s) Become Idle
        One Time                                                                                                       VIDEO (1 of 13)
        Recurring                                                                                                      Cracking Open: HTC Titan II

     You can use the Change button to set a time for recurring backups.                                                       More Videos »


     Enterprise Manager also allows you to set a variety of other options via the SQL Server Backup
     dialog box. If you click on the Options tab, you can choose the following:                                  Hot Questions                     View All

        Verify Backup Upon Completion
                                                                                                                  3     SSL redirection
        Eject Tape After Backup
        Remove Inactive Entries From Transaction Log
        Check Media Set Name And Backup Set Expiration                                                            3     Switching from a Job to a career in
        Backup Set Will Expire (You supply an expiration date.)                                                         the IT field: Need an IT pro's
                                                                                                                        advice
        Initialize And Label Media

     Using T-SQL                                                                                                  2     windows 7 won't shutdown and
     You can also back up a database using T-SQL, which offers options that Enterprise Manager                          keeps switching on
     doesn’t. The syntax for a full backup is as follows:
     BACKUP DATABASE { database_name | @database_name_var }                                                       2     can anyone suggest if any such
     TO  backup_device  [ ,…n ]                                                                                       software exist with similar
     [ WITH                                                                                                             functionality?
     [ BLOCKSIZE = { blocksize | @blocksize_variable } ]
     [ [ , ] DESCRIPTION = { ‘text‘ | @text_variable } ]
                                                                                                                 Ask a Question
     [ [ , ] DIFFERENTIAL ]
     [ [ , ] EXPIREDATE = { date | @date_var }
     | RETAINDAYS = { days | @days_var } ]
     [ [ , ] PASSWORD = { password | @password_variable } ]                                                      Hot Discussions                   View All
     [ [ , ] FORMAT | NOFORMAT ]
     [ [ , ] { INIT | NOINIT } ]                                                                                        Should developers be sued for
                                                                                                                 221
     [ [ , ] MEDIADESCRIPTION = { ‘text‘ | @text_variable } ]                                                           security holes?
     [ [ , ] MEDIANAME = { media_name | @media_name_variable } ]
     [ [ , ] MEDIAPASSWORD = { mediapassword | @mediapassword_variable } ]
                                                                                                                  79    The sitting duck that is open
     [ [ , ] NAME = { backup_set_name | @backup_set_name_var } ]
                                                                                                                        source
     [ [ , ] { NOSKIP | SKIP } ]
     [ [ , ] { NOREWIND | REWIND } ]
                                                                                                                        Five fast Windows desktop search
     [ [ , ] { NOUNLOAD | UNLOAD } ]                                                                              27
                                                                                                                        utilities
     [ [ , ] RESTART ]
     [ [ , ] STATS [ =percentage ] ]
                                                                                                                  24    Five speedy Windows desktop
     For a definition of each option, see the description in SQL Books Online.                                          search apps



http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]
What is your SQL Server backup strategy? | TechRepublic



     Figure D shows an example of how I backed up the Pubs database. By adding NOINIT, I
     appended the information to the end of the backup. By adding Stats to the argument, I received an           Start a Discussion
     output of the percentage of the backup completed.

     Differential backups
     A differential backup backs up only the data that has changed since the last full backup. These
                                                                                                                 Blog Archive
     backups are generally smaller than a full backup and can be used frequently since they run much
     faster. To perform a differential backup in Enterprise Manager, choose the Database-Differential              August 2012        December 2011
     option in the SQL Server Backup dialog box (which we saw in Figure A).                                        July 2012          November 2011
                                                                                                                   June 2012          October 2011
     To perform a differential backup using T-SQL, use the Backup command but add the differential
     argument, as shown in Figure E.                                                                               May 2012           September 2011
                                                                                                                   April 2012         August 2011
     Transaction-log backups                                                                                       March 2012         July 2011
     A transaction-log backup will back up all transactions that occur in the database and purge or
                                                                                                                   February 2012      June 2011
     clean up the log after the backup completes. Using a transaction-log backup gives you point-in-
     time recovery for a database. To perform transaction-log backups with Enterprise Manager,                     January 2012
     choose the Transaction Log option in the SQL Server Backup dialog box.

     Keep in mind that you must be using Full or Bulk-Logged Recovery Models, which will be
     explained below, in order to perform transaction-log backups.

     To perform a transaction-log backup with T-SQL, use the following syntax:
     BACKUP LOG { database_name | @database_name_var }
     {
     TO  backup_device  [ ,…n ]
     [ WITH
     [ BLOCKSIZE = { blocksize | @blocksize_variable } ]
     [ [ , ] DESCRIPTION = { ‘text‘ | @text_variable } ]
     [ [ ,] EXPIREDATE = { date | @date_var }
     | RETAINDAYS = { days | @days_var } ]
     [ [ , ] PASSWORD = { password | @password_variable } ]
     [ [ , ] FORMAT | NOFORMAT ]
     [ [ , ] { INIT | NOINIT } ]
     [ [ , ] MEDIADESCRIPTION = { ‘text‘ | @text_variable } ]
     [ [ , ] MEDIANAME = { media_name | @media_name_variable } ]
     [ [ , ] MEDIAPASSWORD = { mediapassword | @mediapassword_variable } ]
     [ [ , ] NAME = { backup_set_name | @backup_set_name_var } ]
     [ [ , ] NO_TRUNCATE ]
     [ [ , ] { NORECOVERY | STANDBY =undo_file_name } ]
     [ [ , ] { NOREWIND | REWIND } ]
     [ [ , ] { NOSKIP | SKIP } ]
     [ [ , ] { NOUNLOAD | UNLOAD } ]
     [ [ , ] RESTART ]
     [ [ , ] STATS [ =percentage ] ]

     For a detailed definition of each option, please see the description in SQL Books Online. You can
     perform the transaction-log backup by using the Backup Log command, as shown in Figure F.

     File-group backups
     A file-group backup lets you back up individual files or file groups. It basically allows you to back
     up a large database by spreading your backups out over time. This is a more granular type of
     backup that allows an admin to take a custom approach or to simply fill in the gaps of other
     backup methods.

     Using a database recovery model
     The database recovery model is a new feature that was added to SQL Server 2000. This model
     makes it easier to control your backups and disaster recovery options. SQL Server 7.0 options
     like selectinto/bulkcopy and trunc.logoncheckpoint have been replaced in SQL 2000 by the
     Simple, Full, and Bulk-Logged recovery models. Let’s take a look at the differences between these
     models.

     Specifying a recovery model
     To select a database recovery model, right-click on the database and choose Properties. Click the



http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]
What is your SQL Server backup strategy? | TechRepublic

     Options tab and select your recovery model.


     Simple recovery model
     The Simple recovery model is similar to the trunc.logoncheckpoint option in SQL Server 7.0. This
     recovery plan always truncates your transaction log and constantly removes transactions that have
     been committed. Because of this, the transaction log cannot be backed up, which leaves you with
     only two backup options: full and differential.

     If you try to back up the transaction log when using a Simple recovery model, you will receive this
     error message: “The backup log is not allowed while the recovery model is Simple.”

     Full and Bulk-Logged recovery models
     The Full and Bulk-Logged options add an administration and space burden but provide the
     maximum protection for your data. The Full recovery model provides you with better flexibility for
     recovering databases to an earlier point in time. The Bulk-Logged model provides higher
     performance and lower log space usage than Full recovery but does not provide as much
     protection.


     Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free
     newsletters.




                   Passing table valued                          Talking intelligently about
                   parameters in SQL Server                      virtualization
                   2008




         1            Join the conversation!                                              Add Your Opinion
      Comments        Follow via:



      Staff Picks      Top Rated      Most Recent         My Contacts                            See All Comments




                       Remote Backup Strategy                                                          0
                       AlexGreen86 3rd Jul 2011                                                      Votes


             We have a central office with SQL Server 2005 Standard and two branches with SQL
             Express. We perform daily backups on each office. Because SQL Express cannot act
             as Publisher in Replication, we must... Read Whole Comment +


                 View in thread




                                                  See all comments



     Join the TechRepublic Community and join the conversation! Signing-up is
     free and quick, Do it now, we want to hear your opinion.

       Join        Login




http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]

Weitere ähnliche Inhalte

Andere mochten auch

Using grouping sets in sql server 2008 tech republic
Using grouping sets in sql server 2008   tech republicUsing grouping sets in sql server 2008   tech republic
Using grouping sets in sql server 2008 tech republicKaing Menglieng
 
software configuration management
software configuration managementsoftware configuration management
software configuration managementYonghwan SO
 
Deploy MongoDB su Infrastruttura Amazon Web Services
Deploy MongoDB su Infrastruttura Amazon Web ServicesDeploy MongoDB su Infrastruttura Amazon Web Services
Deploy MongoDB su Infrastruttura Amazon Web ServicesStefano Dindo
 

Andere mochten auch (9)

Diploma 6
Diploma 6Diploma 6
Diploma 6
 
Using grouping sets in sql server 2008 tech republic
Using grouping sets in sql server 2008   tech republicUsing grouping sets in sql server 2008   tech republic
Using grouping sets in sql server 2008 tech republic
 
Resume_Sandeep Tanwar
Resume_Sandeep TanwarResume_Sandeep Tanwar
Resume_Sandeep Tanwar
 
resume@dip
resume@dipresume@dip
resume@dip
 
Combustible dust control - part 2
Combustible dust control - part 2Combustible dust control - part 2
Combustible dust control - part 2
 
Web 2
Web 2 Web 2
Web 2
 
software configuration management
software configuration managementsoftware configuration management
software configuration management
 
Les journées de Chipo - Jour 312
Les journées de Chipo - Jour 312Les journées de Chipo - Jour 312
Les journées de Chipo - Jour 312
 
Deploy MongoDB su Infrastruttura Amazon Web Services
Deploy MongoDB su Infrastruttura Amazon Web ServicesDeploy MongoDB su Infrastruttura Amazon Web Services
Deploy MongoDB su Infrastruttura Amazon Web Services
 

Ähnlich wie What is your sql server backup strategy tech_republic

The virtues of backup disaster recovery
The virtues of backup disaster recoveryThe virtues of backup disaster recovery
The virtues of backup disaster recoveryZack Fabro
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal PerformancesVladimir Ilic
 
10 Best Practices for Reducing Spend in Azure
10 Best Practices for Reducing Spend in Azure10 Best Practices for Reducing Spend in Azure
10 Best Practices for Reducing Spend in AzureVAST
 
Streamlining Backup: Enhancing Data Protection with Backup Appliances
Streamlining Backup: Enhancing Data Protection with Backup AppliancesStreamlining Backup: Enhancing Data Protection with Backup Appliances
Streamlining Backup: Enhancing Data Protection with Backup AppliancesMaryJWilliams2
 
Backupify versus Spanning: Offering Ideal Options for IT Site Administrators
Backupify versus Spanning: Offering Ideal Options for IT Site AdministratorsBackupify versus Spanning: Offering Ideal Options for IT Site Administrators
Backupify versus Spanning: Offering Ideal Options for IT Site AdministratorsMabelmcCain01
 
Sql interview question part 9
Sql interview question part 9Sql interview question part 9
Sql interview question part 9kaashiv1
 
Sql interview-question-part-9
Sql interview-question-part-9Sql interview-question-part-9
Sql interview-question-part-9kaashiv1
 
Reduce time to complete backups and restores with Transparent Snapshots with ...
Reduce time to complete backups and restores with Transparent Snapshots with ...Reduce time to complete backups and restores with Transparent Snapshots with ...
Reduce time to complete backups and restores with Transparent Snapshots with ...Principled Technologies
 
Disaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the differenceDisaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the differencejeetendra mandal
 
Backing up Microsoft Great Plains / Microsoft Dynamics GP
Backing up Microsoft Great Plains / Microsoft Dynamics GPBacking up Microsoft Great Plains / Microsoft Dynamics GP
Backing up Microsoft Great Plains / Microsoft Dynamics GPHandy_Backup
 
ServerTemplate Deep Dive
ServerTemplate Deep DiveServerTemplate Deep Dive
ServerTemplate Deep DiveRightScale
 
Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...
Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...
Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...StorageCraft Benelux
 
Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...
Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...
Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...StorageCraft Benelux
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosKeith Hollman
 
UK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVDUK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVDNeil McLoughlin
 
Save time completing backups and restores with a Dell PowerProtect Data Manag...
Save time completing backups and restores with a Dell PowerProtect Data Manag...Save time completing backups and restores with a Dell PowerProtect Data Manag...
Save time completing backups and restores with a Dell PowerProtect Data Manag...Principled Technologies
 
Preventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB OptimizerPreventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB OptimizerMichael Findling
 

Ähnlich wie What is your sql server backup strategy tech_republic (20)

The virtues of backup disaster recovery
The virtues of backup disaster recoveryThe virtues of backup disaster recovery
The virtues of backup disaster recovery
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
10 Best Practices for Reducing Spend in Azure
10 Best Practices for Reducing Spend in Azure10 Best Practices for Reducing Spend in Azure
10 Best Practices for Reducing Spend in Azure
 
Streamlining Backup: Enhancing Data Protection with Backup Appliances
Streamlining Backup: Enhancing Data Protection with Backup AppliancesStreamlining Backup: Enhancing Data Protection with Backup Appliances
Streamlining Backup: Enhancing Data Protection with Backup Appliances
 
Backupify versus Spanning: Offering Ideal Options for IT Site Administrators
Backupify versus Spanning: Offering Ideal Options for IT Site AdministratorsBackupify versus Spanning: Offering Ideal Options for IT Site Administrators
Backupify versus Spanning: Offering Ideal Options for IT Site Administrators
 
Ebook9
Ebook9Ebook9
Ebook9
 
Sql interview question part 9
Sql interview question part 9Sql interview question part 9
Sql interview question part 9
 
Ebook9
Ebook9Ebook9
Ebook9
 
Sql interview-question-part-9
Sql interview-question-part-9Sql interview-question-part-9
Sql interview-question-part-9
 
Reduce time to complete backups and restores with Transparent Snapshots with ...
Reduce time to complete backups and restores with Transparent Snapshots with ...Reduce time to complete backups and restores with Transparent Snapshots with ...
Reduce time to complete backups and restores with Transparent Snapshots with ...
 
Disaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the differenceDisaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the difference
 
Backing up Microsoft Great Plains / Microsoft Dynamics GP
Backing up Microsoft Great Plains / Microsoft Dynamics GPBacking up Microsoft Great Plains / Microsoft Dynamics GP
Backing up Microsoft Great Plains / Microsoft Dynamics GP
 
ServerTemplate Deep Dive
ServerTemplate Deep DiveServerTemplate Deep Dive
ServerTemplate Deep Dive
 
Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...
Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...
Storage craft shadowprotect_product_scenarios_windows_small_business_server_d...
 
Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...
Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...
Storage craft shadowprotect_product_scenarios_windows_server_sbs_disaster_rec...
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
 
UK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVDUK WVD User Group January - Jim Moyle - BC/DR with WVD
UK WVD User Group January - Jim Moyle - BC/DR with WVD
 
Save time completing backups and restores with a Dell PowerProtect Data Manag...
Save time completing backups and restores with a Dell PowerProtect Data Manag...Save time completing backups and restores with a Dell PowerProtect Data Manag...
Save time completing backups and restores with a Dell PowerProtect Data Manag...
 
Preventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB OptimizerPreventing Database Perfomance Issues | DB Optimizer
Preventing Database Perfomance Issues | DB Optimizer
 

Mehr von Kaing Menglieng

Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republicKaing Menglieng
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republicKaing Menglieng
 
Using hash fields in sql server tech republic
Using hash fields in sql server   tech republicUsing hash fields in sql server   tech republic
Using hash fields in sql server tech republicKaing Menglieng
 
Understand when to use user defined functions in sql server tech-republic
Understand when to use user defined functions in sql server   tech-republicUnderstand when to use user defined functions in sql server   tech-republic
Understand when to use user defined functions in sql server tech-republicKaing Menglieng
 
Sql server indexed views speed up your select queries part 1 - code-projec
Sql server indexed views   speed up your select queries  part 1 - code-projecSql server indexed views   speed up your select queries  part 1 - code-projec
Sql server indexed views speed up your select queries part 1 - code-projecKaing Menglieng
 
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupSql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupKaing Menglieng
 
Sql server common interview questions and answers
Sql server   common interview questions and answersSql server   common interview questions and answers
Sql server common interview questions and answersKaing Menglieng
 
Sql server common interview questions and answers page 6
Sql server   common interview questions and answers page 6Sql server   common interview questions and answers page 6
Sql server common interview questions and answers page 6Kaing Menglieng
 
Sql server common interview questions and answers page 5
Sql server   common interview questions and answers page 5Sql server   common interview questions and answers page 5
Sql server common interview questions and answers page 5Kaing Menglieng
 
Sql server common interview questions and answers page 4
Sql server   common interview questions and answers page 4Sql server   common interview questions and answers page 4
Sql server common interview questions and answers page 4Kaing Menglieng
 
Sql server common interview questions and answers page 2
Sql server   common interview questions and answers page 2Sql server   common interview questions and answers page 2
Sql server common interview questions and answers page 2Kaing Menglieng
 
Sql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seSql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seKaing Menglieng
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsKaing Menglieng
 
Speed up sql server apps - visual studio magazine
Speed up sql server apps  - visual studio magazineSpeed up sql server apps  - visual studio magazine
Speed up sql server apps - visual studio magazineKaing Menglieng
 
See sql server graphical execution plans in action tech republic
See sql server graphical execution plans in action   tech republicSee sql server graphical execution plans in action   tech republic
See sql server graphical execution plans in action tech republicKaing Menglieng
 
Reviewing sql server permissions tech republic
Reviewing sql server permissions   tech republicReviewing sql server permissions   tech republic
Reviewing sql server permissions tech republicKaing Menglieng
 
Query optimization how to search millions of record in sql table faster -
Query optimization   how to search millions of record in sql table faster  -Query optimization   how to search millions of record in sql table faster  -
Query optimization how to search millions of record in sql table faster -Kaing Menglieng
 
Optimize sql server queries with these advanced tuning techniques tech repu
Optimize sql server queries with these advanced tuning techniques   tech repuOptimize sql server queries with these advanced tuning techniques   tech repu
Optimize sql server queries with these advanced tuning techniques tech repuKaing Menglieng
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republicKaing Menglieng
 

Mehr von Kaing Menglieng (20)

Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republic
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republic
 
Using hash fields in sql server tech republic
Using hash fields in sql server   tech republicUsing hash fields in sql server   tech republic
Using hash fields in sql server tech republic
 
Understand when to use user defined functions in sql server tech-republic
Understand when to use user defined functions in sql server   tech-republicUnderstand when to use user defined functions in sql server   tech-republic
Understand when to use user defined functions in sql server tech-republic
 
Sql server indexed views speed up your select queries part 1 - code-projec
Sql server indexed views   speed up your select queries  part 1 - code-projecSql server indexed views   speed up your select queries  part 1 - code-projec
Sql server indexed views speed up your select queries part 1 - code-projec
 
Sql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookupSql server – query optimization – remove bookmark lookup – remove rid lookup
Sql server – query optimization – remove bookmark lookup – remove rid lookup
 
Sql server common interview questions and answers
Sql server   common interview questions and answersSql server   common interview questions and answers
Sql server common interview questions and answers
 
Sql server common interview questions and answers page 6
Sql server   common interview questions and answers page 6Sql server   common interview questions and answers page 6
Sql server common interview questions and answers page 6
 
Sql server common interview questions and answers page 5
Sql server   common interview questions and answers page 5Sql server   common interview questions and answers page 5
Sql server common interview questions and answers page 5
 
Sql server common interview questions and answers page 4
Sql server   common interview questions and answers page 4Sql server   common interview questions and answers page 4
Sql server common interview questions and answers page 4
 
Sql server common interview questions and answers page 2
Sql server   common interview questions and answers page 2Sql server   common interview questions and answers page 2
Sql server common interview questions and answers page 2
 
Sql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql seSql server – 2008 – hardware and software requirements for installing sql se
Sql server – 2008 – hardware and software requirements for installing sql se
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joins
 
Speed up sql
Speed up sqlSpeed up sql
Speed up sql
 
Speed up sql server apps - visual studio magazine
Speed up sql server apps  - visual studio magazineSpeed up sql server apps  - visual studio magazine
Speed up sql server apps - visual studio magazine
 
See sql server graphical execution plans in action tech republic
See sql server graphical execution plans in action   tech republicSee sql server graphical execution plans in action   tech republic
See sql server graphical execution plans in action tech republic
 
Reviewing sql server permissions tech republic
Reviewing sql server permissions   tech republicReviewing sql server permissions   tech republic
Reviewing sql server permissions tech republic
 
Query optimization how to search millions of record in sql table faster -
Query optimization   how to search millions of record in sql table faster  -Query optimization   how to search millions of record in sql table faster  -
Query optimization how to search millions of record in sql table faster -
 
Optimize sql server queries with these advanced tuning techniques tech repu
Optimize sql server queries with these advanced tuning techniques   tech repuOptimize sql server queries with these advanced tuning techniques   tech repu
Optimize sql server queries with these advanced tuning techniques tech repu
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republic
 

What is your sql server backup strategy tech_republic

  • 1. What is your SQL Server backup strategy? | TechRepublic ZDNet Asia SmartPlanet TechRepublic Log In Join TechRepublic FAQ Go Pro! Blogs Downloads Newsletters Galleries Q&A Discussions News Research Library IT Management Development IT Support Data Center Networks Security Home / Blogs / The Enterprise Cloud Follow this blog: The Enterprise Cloud What is your SQL Server backup strategy? By Steven Warren August 28, 2007, 9:00 AM PDT Takeaway: Most database administrators (DBAs) know what it’s like to be called away from home or dinner or even awakened in the middle of the night to answer a page or a cell-phone call concerning some type of database disaster. These are the times you’re glad that you have a systematic backup plan. Of course, conversely, [...] Most database administrators (DBAs) know what it’s like to be called away from home or dinner or even awakened in the middle of the night to answer a page or a cell-phone call concerning some type of database disaster. These are the times you’re glad that you have a systematic backup MapR Hadoop plan. Of course, conversely, if you don’t have a good backup plan, these are the times you regret it. Download Most Open, Enterprise-Grade Distribution for In this article, we will discuss various types of backup strategies and demonstrate how to Hadoop. Try Now. implement each of these types of backups using Enterprise Manager, the graphical user interface www.mapr.com/Free-download (GUI), and Transact SQL (T-SQL) in Microsoft SQL Server 2000. Google Docs For Business Start with 5 GB of Included Storage Get Additional 20 GB Just $4/month! www.google.com/apps Put together a backup plan Before developing your backup strategy, you need to develop a plan of action. Evaluate your Data Masking Software Secure your sensitive data with Grid-Tools' company and ask, “What is the maximum amount of downtime we can live with?” Once this is Enterprise Data Masking established, you can decide on the appropriate course of action by matching your company’s www.grid-tools.com needs to the appropriate level of database backup. Full backups A full backup is the easiest type of backup to implement in SQL Server. It takes a complete picture Keep Up with TechRepublic of your database that includes backing up users and permissions. In addition, this backup can occur while transactions are still occurring in your system. When the backup begins, the date is recorded, the data pages are backed up, and all transactions that occur while the backup runs are appended to the backup. Five Apps Author’s note Google in the Enterprise A full backup backs up your users but not your logins. If you want to back up your logins, remember to back up the Master database. Furthermore, if you ever restore your database to a Subscribe Today different server, you must synchronize your logins by using the sp_change_users_login. For a more detailed explanation of this stored procedure, see SQL Books Online. Follow us however you choose! Using Enterprise Manager http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]
  • 2. What is your SQL Server backup strategy? | TechRepublic To implement a full backup using Enterprise Manager, expand the SQL Server to display your databases. Right-click on the database and select All Tasks | Backup Database to access the options shown in Figure A. Under Backup, choose Database - Complete. Then, select a destination (tape or disk). If this is the first backup of your database, you will have to create a backup device or file. A backup device is Media Gallery simply a location that stores your backups. A backup file can also hold multiple “backups.” To create a backup device or file, start by clicking Add. Next, select either File Name or Backup Device. (Figure B shows the dialog box you’ll see if you choose Backup Device.) Then, just define the appropriate path and click OK. Once you’ve created the device or file, you can select it from the Destination list box. The SQL Server Backup dialog box also includes options to append to a backup or overwrite it. PHOTO GALLERY (1 of 15) This means that you can add multiple backups to your file or device or overwrite previous backups Curiosity's autonomous 'seven minutes of... with the most current one. If you want to schedule your backups, select the Schedule check box and then click the button that has three dots on it. In the Edit Schedule dialog box, shown in More Galleries » Figure C, make your scheduling specifications. You can choose from the following options: Start Automatically When SQL Server Agent Starts Start Whenever CPU(s) Become Idle One Time VIDEO (1 of 13) Recurring Cracking Open: HTC Titan II You can use the Change button to set a time for recurring backups. More Videos » Enterprise Manager also allows you to set a variety of other options via the SQL Server Backup dialog box. If you click on the Options tab, you can choose the following: Hot Questions View All Verify Backup Upon Completion 3 SSL redirection Eject Tape After Backup Remove Inactive Entries From Transaction Log Check Media Set Name And Backup Set Expiration 3 Switching from a Job to a career in Backup Set Will Expire (You supply an expiration date.) the IT field: Need an IT pro's advice Initialize And Label Media Using T-SQL 2 windows 7 won't shutdown and You can also back up a database using T-SQL, which offers options that Enterprise Manager keeps switching on doesn’t. The syntax for a full backup is as follows: BACKUP DATABASE { database_name | @database_name_var } 2 can anyone suggest if any such TO backup_device [ ,…n ] software exist with similar [ WITH functionality? [ BLOCKSIZE = { blocksize | @blocksize_variable } ] [ [ , ] DESCRIPTION = { ‘text‘ | @text_variable } ] Ask a Question [ [ , ] DIFFERENTIAL ] [ [ , ] EXPIREDATE = { date | @date_var } | RETAINDAYS = { days | @days_var } ] [ [ , ] PASSWORD = { password | @password_variable } ] Hot Discussions View All [ [ , ] FORMAT | NOFORMAT ] [ [ , ] { INIT | NOINIT } ] Should developers be sued for 221 [ [ , ] MEDIADESCRIPTION = { ‘text‘ | @text_variable } ] security holes? [ [ , ] MEDIANAME = { media_name | @media_name_variable } ] [ [ , ] MEDIAPASSWORD = { mediapassword | @mediapassword_variable } ] 79 The sitting duck that is open [ [ , ] NAME = { backup_set_name | @backup_set_name_var } ] source [ [ , ] { NOSKIP | SKIP } ] [ [ , ] { NOREWIND | REWIND } ] Five fast Windows desktop search [ [ , ] { NOUNLOAD | UNLOAD } ] 27 utilities [ [ , ] RESTART ] [ [ , ] STATS [ =percentage ] ] 24 Five speedy Windows desktop For a definition of each option, see the description in SQL Books Online. search apps http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]
  • 3. What is your SQL Server backup strategy? | TechRepublic Figure D shows an example of how I backed up the Pubs database. By adding NOINIT, I appended the information to the end of the backup. By adding Stats to the argument, I received an Start a Discussion output of the percentage of the backup completed. Differential backups A differential backup backs up only the data that has changed since the last full backup. These Blog Archive backups are generally smaller than a full backup and can be used frequently since they run much faster. To perform a differential backup in Enterprise Manager, choose the Database-Differential August 2012 December 2011 option in the SQL Server Backup dialog box (which we saw in Figure A). July 2012 November 2011 June 2012 October 2011 To perform a differential backup using T-SQL, use the Backup command but add the differential argument, as shown in Figure E. May 2012 September 2011 April 2012 August 2011 Transaction-log backups March 2012 July 2011 A transaction-log backup will back up all transactions that occur in the database and purge or February 2012 June 2011 clean up the log after the backup completes. Using a transaction-log backup gives you point-in- time recovery for a database. To perform transaction-log backups with Enterprise Manager, January 2012 choose the Transaction Log option in the SQL Server Backup dialog box. Keep in mind that you must be using Full or Bulk-Logged Recovery Models, which will be explained below, in order to perform transaction-log backups. To perform a transaction-log backup with T-SQL, use the following syntax: BACKUP LOG { database_name | @database_name_var } { TO backup_device [ ,…n ] [ WITH [ BLOCKSIZE = { blocksize | @blocksize_variable } ] [ [ , ] DESCRIPTION = { ‘text‘ | @text_variable } ] [ [ ,] EXPIREDATE = { date | @date_var } | RETAINDAYS = { days | @days_var } ] [ [ , ] PASSWORD = { password | @password_variable } ] [ [ , ] FORMAT | NOFORMAT ] [ [ , ] { INIT | NOINIT } ] [ [ , ] MEDIADESCRIPTION = { ‘text‘ | @text_variable } ] [ [ , ] MEDIANAME = { media_name | @media_name_variable } ] [ [ , ] MEDIAPASSWORD = { mediapassword | @mediapassword_variable } ] [ [ , ] NAME = { backup_set_name | @backup_set_name_var } ] [ [ , ] NO_TRUNCATE ] [ [ , ] { NORECOVERY | STANDBY =undo_file_name } ] [ [ , ] { NOREWIND | REWIND } ] [ [ , ] { NOSKIP | SKIP } ] [ [ , ] { NOUNLOAD | UNLOAD } ] [ [ , ] RESTART ] [ [ , ] STATS [ =percentage ] ] For a detailed definition of each option, please see the description in SQL Books Online. You can perform the transaction-log backup by using the Backup Log command, as shown in Figure F. File-group backups A file-group backup lets you back up individual files or file groups. It basically allows you to back up a large database by spreading your backups out over time. This is a more granular type of backup that allows an admin to take a custom approach or to simply fill in the gaps of other backup methods. Using a database recovery model The database recovery model is a new feature that was added to SQL Server 2000. This model makes it easier to control your backups and disaster recovery options. SQL Server 7.0 options like selectinto/bulkcopy and trunc.logoncheckpoint have been replaced in SQL 2000 by the Simple, Full, and Bulk-Logged recovery models. Let’s take a look at the differences between these models. Specifying a recovery model To select a database recovery model, right-click on the database and choose Properties. Click the http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]
  • 4. What is your SQL Server backup strategy? | TechRepublic Options tab and select your recovery model. Simple recovery model The Simple recovery model is similar to the trunc.logoncheckpoint option in SQL Server 7.0. This recovery plan always truncates your transaction log and constantly removes transactions that have been committed. Because of this, the transaction log cannot be backed up, which leaves you with only two backup options: full and differential. If you try to back up the transaction log when using a Simple recovery model, you will receive this error message: “The backup log is not allowed while the recovery model is Simple.” Full and Bulk-Logged recovery models The Full and Bulk-Logged options add an administration and space burden but provide the maximum protection for your data. The Full recovery model provides you with better flexibility for recovering databases to an earlier point in time. The Bulk-Logged model provides higher performance and lower log space usage than Full recovery but does not provide as much protection. Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters. Passing table valued Talking intelligently about parameters in SQL Server virtualization 2008 1 Join the conversation! Add Your Opinion Comments Follow via: Staff Picks Top Rated Most Recent My Contacts See All Comments Remote Backup Strategy 0 AlexGreen86 3rd Jul 2011 Votes We have a central office with SQL Server 2005 Standard and two branches with SQL Express. We perform daily backups on each office. Because SQL Express cannot act as Publisher in Replication, we must... Read Whole Comment + View in thread See all comments Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion. Join Login http://www.techrepublic.com/blog/datacenter/what-is-your-sql-server-backup-strategy/165[08/29/2012 3:08:59 PM]