Unix Technical Forum

Saving .mdf database

This is a discussion on Saving .mdf database within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello, I use SQL Server 2005 Express and I would like to save on db of mine... Have I ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 07:03 PM
Maury
 
Posts: n/a
Default Saving .mdf database

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 07:03 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Saving .mdf database

Maury (maurizio.alberti_TOGLI_@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, esquel@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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 07:03 PM
Jens
 
Posts: n/a
Default Re: Saving .mdf database

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
---

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 07:03 PM
Greg D. Moore \(Strider\)
 
Posts: n/a
Default Re: Saving .mdf database


"Maury" <maurizio.alberti_TOGLI_@gmail.com> wrote in message
news:gCn_f.75203$PR2.1228292@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.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-29-2008, 07:03 PM
Maury
 
Posts: n/a
Default Re: Saving .mdf database

Thanks for these three answers,
I found all very useful.
I thank you very much for your help

Bye
M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com