{"id":1744,"date":"2016-04-20T22:02:11","date_gmt":"2016-04-21T03:02:11","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=1744"},"modified":"2016-04-20T22:02:11","modified_gmt":"2016-04-21T03:02:11","slug":"automating-the-backup-of-a-sql-server-2008-express-database","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=1744","title":{"rendered":"Automating the Backup of a SQL Server 2008 Express Database"},"content":{"rendered":"<div class=\"postHdr clearfix\">\n<div class=\"row-fluid\">\n<div class=\"postTitle span8\"><a id=\"viewpost_ascx_TitleUrl\" title=\"Title of this entry.\" href=\"http:\/\/geekswithblogs.net\/JaydPage\/archive\/2011\/02\/19\/automating-the-backup-of-a-sql-server-2008-express-database.aspx\">Automating the Backup of a SQL Server 2008 Express Database<\/a><\/div>\n<\/div>\n<\/div>\n<p><strong><span style=\"font-size: large;\">Steps Involved:<\/span><\/strong><\/p>\n<p><strong>1)<\/strong> Create a Database Backup Script.<\/p>\n<p><strong>2)<\/strong> Create a Scheduled Task To Run the Backup Script.<\/p>\n<p><strong><span style=\"font-size: large;\">1 Create a Database Backup Script.<\/span><\/strong><\/p>\n<p><strong>a)<\/strong> Download and install SQL Server Management Studio. This is a free tool available on the Microsoft website.<\/p>\n<p><strong>b)<\/strong> Once Management Studio is installed launch it and connect to the SQL server instance that contains the database that you want to back up.<\/p>\n<p><strong>c)<\/strong> Right click on the database and then in the menu choose Tasks -&gt; Back up&#8230;<\/p>\n<p><strong>d)<\/strong> This will open up a window where you can choose your backup options, once you are happy with the options click on the &#8220;Script&#8221; button near the top and select the &#8220;Script Action to File&#8221; option.<\/p>\n<p><strong>e)<\/strong> Save the File.<\/p>\n<p><strong><span style=\"font-size: large;\">2 Create a Schedule Task to Run the Backup Script<\/span><\/strong><\/p>\n<p><strong>a)<\/strong> Open up Windows Task Scheduler.<\/p>\n<p><strong>b)<\/strong> Create a new Task using the wizard, when asked to select a program browse to C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\binn\\<span class=\"skimlinks-unlinked\">SQLCMD.exe<\/span><\/p>\n<p><strong>c)<\/strong> There are 2 arguments that need to be set: -S \\SERVER_INSTANCE_NAME\u00a0 -i &#8220;PATH_OF_SQLBACKUP_SCRIPT&#8221;<br \/>\nwhere SERVER_INSTANCE_NAME\u00a0 is the name of the instance of SQL server that contains your database e.g. (local) and PATH_OF_SQLBACKUP_SCRIPT is the path of your backup script e.g. &#8220;C:\\Program Files\\Microsoft SQL Server\\<span class=\"skimlinks-unlinked\">DatastoreBackup.sql<\/span>&#8221;<\/p>\n<p><strong>d)<\/strong> Adjust the task to run at the desired times and you are done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automating the Backup of a SQL Server 2008 Express Database Steps Involved: 1) Create a Database Backup Script. 2) Create a Scheduled Task To Run the Backup Script. 1 Create a Database Backup Script. a) Download and install SQL Server &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=1744\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1744"}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1744"}],"version-history":[{"count":1,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1744\/revisions"}],"predecessor-version":[{"id":1745,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1744\/revisions\/1745"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1744"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}