Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

An Automatically Executing Database Backup Script

Posted on 2009-05-05
2
202 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
ID: 24310793
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
ID: 24333566
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Date from a string 4 70
SQL query to summarize items per month 5 71
create insert script based on records in a table 4 24
Help Required 2 39
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

856 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