Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I backup an entire database in MS SQL Server Express 2005?

Posted on 2008-06-25
6
Medium Priority
?
234 Views
Last Modified: 2010-04-21
I have a copy of MS SQL Server 2005 Express Edition that is running on database engine at this time.

Included in this instance is about 100 seperate databases.  I need to automate a way to back these databases on a nightly basis and because I am using SQL Express I do not have access to SQL Server Agent to automate this.

Any help is appreciated.
0
Comment
Question by:hyphenpipe
[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
  • 2
6 Comments
 
LVL 6

Author Comment

by:hyphenpipe
ID: 21865078
I did find this article which looks promising:

http://www.mssqltips.com/tip.asp?tip=1174

But I need to backup about 100 databases and I am adding more all the time so I need it to be dynamic without me having to go an modify the SQL command every time I add a new database.

Also, I am am unsure as to how this tutorial handles attached databases that may have open connections to them.

Can anyone clear that up for me?
0
 
LVL 7

Expert Comment

by:dineesh
ID: 21865095
hi,

is there a time when you can stop the SQL services for some time depending on your database size?

in that case you can write a vbscript to stop the sql service and copy the physical files from the data folder into another path.

else try this too..

use ntbackup - Start -> Programs -> Accessiories -> System Tools -> Backup

and backup the data folder, that does a volume shadow copy, once you have a backup, try to restore on another system with SQL Express and Attach the database and point it to the data files.

if that works then you can automate it from scheduler.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 21865126
try this:

exec sp_MSforeachdb 'BACKUP DATABASE [?] TO DISK
=N''d:\mssqldata\MSSQL\BACKUP\[?]_Backup.bak'', INIT'
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Author Comment

by:hyphenpipe
ID: 21865231
I just realized I only need to back up one database in the instance.  The other databases just contain views that point the this one.

If there was a way to do this while users are online, that would be sweet.
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 2000 total points
ID: 21865238
sure...you can backup w/ users online:

backup database yourdbname
to disk = 'c:\backupfile.bak' with init
0
 
LVL 6

Author Closing Comment

by:hyphenpipe
ID: 31470945
Thanks for clearing that up.  Wasn;t sure if I could back it up with users online, but it works fine.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

705 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