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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
| 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 --- |
| |||
| "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. |
| Thread Tools | |
| Display Modes | |
|
|