By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

Saving .mdf database

P: n/a
Hello,
I use SQL Server 2005 Express and I would like
to save on db of mine...
Have I only to save the .mdf and .ldf data file
or I need to stop some service or other programs?
Can I use some utility to schedule this?
Thanks
M.
Apr 10 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Maury (ma*********************@gmail.com) writes:
I use SQL Server 2005 Express and I would like
to save on db of mine...
Have I only to save the .mdf and .ldf data file
or I need to stop some service or other programs?
Can I use some utility to schedule this?


I'm not sure that I understand. What would the purpose be for this
operation? It sounds to like you are looking for the BACKUP command.
Which will not save your .mdf and .ldf files, but save a consistent
backup of the database.

Normally, you should leave the .mdf and .ldf files alone.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 10 '06 #2

P: n/a
I agree with Erland, you could either make a *hot* backup which can be
done via the BACKUP command, or you can use a *cold* backup, wih
stopping the services of SQL Server and copying the files somewhere on
your backup storage. Stopping the services puts up the need to have a
maintainance window, because noone will be able to access the database
during this time. Otherwise its a bit faster to just save away your
data.

HTH, jens Suessmeyer.

---
http://www.sqlserver2005.de
---

Apr 10 '06 #3

P: n/a

"Maury" <ma*********************@gmail.com> wrote in message
news:gC*********************@twister2.libero.it...
Hello,
I use SQL Server 2005 Express and I would like
to save on db of mine...
Have I only to save the .mdf and .ldf data file
or I need to stop some service or other programs?
Can I use some utility to schedule this?
Most likely you want to issue a command like:

BACKUP DATABASE <dbname> to disk='x:=\backups\dbname_yyyymmdd.bak'

Look up details in Books Online.

If you really want to take the DB off line, do a NET STOP command and then
back up the files followed by NET START.

(I'm not sure of the SQL Server Express service name since I can't get it to
install on my desktop.)

Thanks
M.

Apr 10 '06 #4

P: n/a
Thanks for these three answers,
I found all very useful.
I thank you very much for your help

Bye
M.
Apr 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.