Solved

An Automatically Executing Database Backup Script

Posted on 2009-05-05
2
199 Views
Last Modified: 2012-05-06
Greetings All:

I am new to SQL Server 2005 standard and am trying to catch up and wondering if I can ask assistance from someone in the group.  I would like to establish a script that would automatically execute on our database server at various times during the day and  perform a full backup of our new database.  The naming structure of the  backup would be comprised from the database name and a date and time stamp.  For example a backup of database "ABC" taken today at 10:00AM would be named "abc0505091000.bak".

My initial aim is that by backing up the database at various times during the day I minimize the amount of loss should we experience a catastrophic failure of the database.  Additionally I can copy the above backups to removable media and store them offsite for contingency protection as well.

By the time the system grows to substantial size I can explore alternative methods of protecting the data as well as have a budget to support the plan.

Your suggestions would be greatly appreciated.
0
Comment
Question by:Ken Carpenter
2 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 125 total points
Comment Utility
YOu can look at the script I use in this article to get an idea as to how to write the script w/the db name in it.  The very first script will do it.

http://sqlservernation.com/blogs/tipweek/archive/2009/02/23/automated-sql-server-express-backups.aspx
0
 
LVL 3

Assisted Solution

by:GregTSmith
GregTSmith earned 125 total points
Comment Utility
SQL Server can generate the script for you as well.

Right-click the database > Tasks > Back Up > Set all the appropriate settings, and click the script button.  

You could then setup a job that runs the generated script.  
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now