?
Solved

How to automate my sql backup

Posted on 2008-10-03
3
Medium Priority
?
484 Views
Last Modified: 2012-01-12
Dear SQL experts,

I have a database that is being backup manually. Backup to a local file and the file will eventually be put onto tape. (For some reason my SQL Server is not recognising my tape drive but its ok I can live with that because I backup not only my SQL database on it)

What I am asking is a way to automate this backup process.  At the moment I backup my database by going into Management Studio, right-click on the database, select Backup and choose the destination file (overwrite the existing one); then a separate backup process will backup this .bak file to tape. I would like to know what I can do to automate the backup.

Has anyone got a step by step guide for this? I know a bit of SQL so I am not too scared with SQL statements. I heard about creating a permanent device to store the backup but am not sure what is that; also I am not sure about truncating transaction logs. My hope is if there is a standard backup statement that I can schedule it to run at a chosen time. I want to perform FULL backup everyday.

THanks in advance.
0
Comment
Question by:ormerodrutter
[X]
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
3 Comments
 

Accepted Solution

by:
Bretty1 earned 1000 total points
ID: 22632210
Hello mate.
Presuming you are using SQL 2005, and you have installed all components you can automate this process with the maintenance wizard.  
As follows in SQL Server Management Studio:
1) Root DB Folder > Management > Maintance Plans.
2) Right click new maintenance plan, when prompted give the maintenance plan a name.
Follow this wizard.
This is the most simple method.  First check and see if this suits your needs.
If you want to get more complicated and have more options, then there is plenty of TSQL options for scripting the backup.
0
 
LVL 7

Expert Comment

by:DarkHill
ID: 22632707
I use the following SP to backup all the DBs on my server every day: http://www.sqldbatips.com/showarticle.asp?ID=27

I then use a JScript to zip the backups and FTP them to our backup server, but I think you have this covered.
0
 
LVL 23

Author Closing Comment

by:ormerodrutter
ID: 31502690
Thanks Bretty1 that works a treat. I supposed backing up the database that way I don't need to worry about transaction logs?

Sorry Darkhill Bretty's solution is easier to follow and he went in first.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

752 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