{"id":3534,"date":"2016-02-18T09:31:04","date_gmt":"2016-02-18T14:31:04","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=3534"},"modified":"2023-10-17T04:51:21","modified_gmt":"2023-10-17T08:51:21","slug":"sql-server-database-health-check","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/","title":{"rendered":"SQL Server Database Health-Check"},"content":{"rendered":"

\"SQLAre you sure you can\u00a0restore your database with the help of backups with minimal loss? Do you restore your data regularly? Probably many\u00a0SQL Server users\u00a0don’t even think of\u00a0it until it strikes them. So ask yourself yet another question – What should I do about my backup to make sure I can restore it with minimal loss should a disaster occur? To put it shortly – You need to check the health of your SQL Server database regularly. Read on to find out how it’s done.<\/p>\n

SQL Server Database Health-Check<\/h2>\n

It’s common knowledge that the best way of keeping your database safe and sound is to make scheduled backups regularly. Of course, it is necessary to work out the best backup plan that will cover all your needs. But before that you have to consider RPO (Recovery Point Objective) and\u00a0RTO (Recovery Time Objective).<\/p>\n

Recovery Point Objective (RPO)<\/h3>\n

In other words – how much data can you afford to lose? For example, your database backup plan is Full backup every 24 hours, differential every four hours and transaction log every 15 minutes,\u00a0in such\u00a0case if failure occurs the time for which data will be lost will not exceed 15 minutes. To be confident in your backup plan your database should be in the full recovery mode and your transaction log backups should occur every “<=n” minutes. (“n” – is the\u00a0maximum amount of data loss that you can sustain).<\/p>\n

Recovery Time Objective (RTO)<\/h3>\n

RTO – if database disaster occurs, how much time are you able to spend restoring a database to its working condition?\u00a0This will determine whether you just keep your backups on a drive ready for access or actively keep a warm standby using log shipping.<\/p>\n

Restore Your Backups<\/h3>\n

Suppose you are familiar with\u00a0RPO and\u00a0RTO,\u00a0but beside this, you need to do regular SQL Server database backup health-check. Testing\u00a0your database backups is an extremely important point which should not be ignored.\u00a0This implies<\/span> that from time to time you need to restore your database with the help of backups to another server\u00a0or another database. Restoring\u00a0database periodically is useful not only for practice but also to check the validity of backups. <\/span><\/p>\n

Please note, if you haven’t yet tried restoring your database backup it means that you don’t have a backup!<\/span><\/p>\n

RESTORE VERIFYONLY and CHECKSUM options<\/h3>\n

As an additional SQL Server database backup health-check, you can make all backups with\u00a0CHECKSUM option.\u00a0The checksum is a value calculated from the data page bytes. Equal data pages have equal\u00a0checksums. Use the following T-SQL Command to perform a backup with CHECKSUM:<\/p>\n

BACKUP DATABASE<\/span> Adventureworks <\/em><\/span>TO DISK<\/span> =<\/span> 'Adventureworks<\/em>.bak'<\/span> WITH CHECKSUM<\/span><\/span>;<\/pre>\n

You can verify a backup with the VERIFYONLY \u00a0option. It does not restore the backup, it only verifies it:<\/p>\n

RESTORE VERIFYONLY FROM DISK<\/span> = <\/span>'Adventureworks<\/em>.bak'<\/span><\/pre>\n

Conclusion<\/h2>\n

So, your backup plan and RESTORE VERIFYONLY &\u00a0CHECKSUM options are just additional tools that can help you to perform SQL Server database health-check, but the best way to make sure you will be able\u00a0to restore your database with minimal loss is to restore all necessary backups to another server or database.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

Are you sure you can\u00a0restore your database with the help of backups with minimal loss? Do you restore your data regularly? Probably many\u00a0SQL Server users\u00a0don’t even think of\u00a0it until it strikes them. So ask yourself yet another question – What should I do about my backup to make sure I can restore it with minimal […]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"\nSQL Server Database Health-Check<\/title>\n<meta name=\"description\" content=\"SQL Server Database Health-Check. How to be sure that all database backups are in the working condition?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server Database Health-Check\" \/>\n<meta property=\"og:description\" content=\"SQL Server Database Health-Check. How to be sure that all database backups are in the working condition?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/\" \/>\n<meta property=\"og:site_name\" content=\"Sql Server Backup Academy\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-18T14:31:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-17T08:51:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/academy.sqlbak.com\/wp-content\/uploads\/2016\/02\/SQL-Server-Database-Health-Check.jpg\" \/>\n<meta name=\"author\" content=\"Alexandr Omelchenko\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexandr Omelchenko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/\",\"url\":\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/\",\"name\":\"SQL Server Database Health-Check\",\"isPartOf\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#website\"},\"datePublished\":\"2016-02-18T14:31:04+00:00\",\"dateModified\":\"2023-10-17T08:51:21+00:00\",\"author\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\"},\"description\":\"SQL Server Database Health-Check. How to be sure that all database backups are in the working condition?\",\"breadcrumb\":{\"@id\":\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SQL Server Database Health-Check\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/academy.sqlbak.com\/#website\",\"url\":\"https:\/\/academy.sqlbak.com\/\",\"name\":\"Sql Server Backup Academy\",\"description\":\"All you need to know about Sql Server database backup\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/academy.sqlbak.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\",\"name\":\"Alexandr Omelchenko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g\",\"caption\":\"Alexandr Omelchenko\"},\"sameAs\":[\"http:\/\/sqlbak.com\"],\"url\":\"https:\/\/academy.sqlbak.com\/author\/alexandr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server Database Health-Check","description":"SQL Server Database Health-Check. How to be sure that all database backups are in the working condition?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server Database Health-Check","og_description":"SQL Server Database Health-Check. How to be sure that all database backups are in the working condition?","og_url":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/","og_site_name":"Sql Server Backup Academy","article_published_time":"2016-02-18T14:31:04+00:00","article_modified_time":"2023-10-17T08:51:21+00:00","og_image":[{"url":"https:\/\/academy.sqlbak.com\/wp-content\/uploads\/2016\/02\/SQL-Server-Database-Health-Check.jpg"}],"author":"Alexandr Omelchenko","twitter_card":"summary","twitter_misc":{"Written by":"Alexandr Omelchenko","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/","url":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/","name":"SQL Server Database Health-Check","isPartOf":{"@id":"https:\/\/academy.sqlbak.com\/#website"},"datePublished":"2016-02-18T14:31:04+00:00","dateModified":"2023-10-17T08:51:21+00:00","author":{"@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8"},"description":"SQL Server Database Health-Check. How to be sure that all database backups are in the working condition?","breadcrumb":{"@id":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/academy.sqlbak.com\/sql-server-database-health-check\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"SQL Server Database Health-Check"}]},{"@type":"WebSite","@id":"https:\/\/academy.sqlbak.com\/#website","url":"https:\/\/academy.sqlbak.com\/","name":"Sql Server Backup Academy","description":"All you need to know about Sql Server database backup","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/academy.sqlbak.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8","name":"Alexandr Omelchenko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g","caption":"Alexandr Omelchenko"},"sameAs":["http:\/\/sqlbak.com"],"url":"https:\/\/academy.sqlbak.com\/author\/alexandr\/"}]}},"_links":{"self":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/3534"}],"collection":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/comments?post=3534"}],"version-history":[{"count":19,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/3534\/revisions"}],"predecessor-version":[{"id":3844,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/3534\/revisions\/3844"}],"wp:attachment":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/media?parent=3534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/categories?post=3534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/tags?post=3534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}