{"id":5121,"date":"2024-07-15T12:45:10","date_gmt":"2024-07-15T19:45:10","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=5121"},"modified":"2024-07-15T12:46:01","modified_gmt":"2024-07-15T19:46:01","slug":"how-to-backup-microsoft-sql-database-by-using-transact-sql","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=5121","title":{"rendered":"How to Backup Microsoft SQL Database by Using Transact-SQL"},"content":{"rendered":"\n<p>Create a full database backup by executing the BACKUP DATABASE statement to create the full database backup, specifying:<\/p>\n\n\n\n<p>The name of the database to back up.<br>The backup device where the full database backup is written.<br>The backup options like COPY_ONLY, COMPRESSION, etc.<\/p>\n\n\n\n<p>COMPRESSION will be very helpful to reduce the backup size.<br>COPY_ONLY is very useful for created a once-off backup, so if won&#8217;t affect any existing backup plan if any.<\/p>\n\n\n\n<p>For Examples:<\/p>\n\n\n\n<p>BACKUP DATABASE ANDARPRODUCTION TO DISK = &#8216;F:\\Backup\\ANDARPRODUCTION.bak&#8217;<br>&nbsp; WITH COPY_ONLY, INIT, COMPRESSION;<\/p>\n\n\n\n<p>Also, most likely you should backup to Log for the same database as well to avoid lose any uncommited transitions.<\/p>\n\n\n\n<p>BACKUP LOG ANDARPRODUCTION TO DISK = &#8216;F:\\Backup\\ANDARPRODUCTION.TRN&#8217;<br>WITH COPY_ONLY, INIT, COMPRESSION;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a full database backup by executing the BACKUP DATABASE statement to create the full database backup, specifying: The name of the database to back up.The backup device where the full database backup is written.The backup options like COPY_ONLY, COMPRESSION, etc. COMPRESSION will be very helpful to reduce the backup size.COPY_ONLY is very useful for <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=5121\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,625],"tags":[1799,1800],"class_list":["post-5121","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-sql","tag-backup-microsoft-sql-database-by-using-transact-sql","tag-backup-ms-sql-database-by-using-query"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/5121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5121"}],"version-history":[{"count":2,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/5121\/revisions"}],"predecessor-version":[{"id":5123,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/5121\/revisions\/5123"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}