Groups | Blog | Home
all groups > sql server misc > december 2003 >

sql server misc : Moving database from one SQL to Another



DavidM
12/12/2003 4:52:17 PM
Hello --

I have employee that frequently needs to copy SQL Server databases from one
server to another. The problem is, this employee doesn't know SQL Server and
doesn't seem to care about how he gets the database copied and moved over,
as long as it works.

I've emphasized to the employee that he should

A) backup the current database to a disk file, move to the new server and
restore..

B) Detach the database, copy to another file, then re-attach both the
original and new database.

His methods are simply shutdown SQL Server and copy the .mdf and .ldf files
and re-attach on the new server.

Is this acceptable?

Will/can this cause problems?

Sounds kind of corny to stop/restart SQL just to copy a database.

Thanks


--
....david
http://www.micro-mess.com
http://www.va-mustang.com
If you wish to reply to me personally, please remove
the "underline" from scandal_123@cox.net. The is done to avoid SPAM!

John Bell
12/14/2003 9:48:47 PM
Hi

Although this will work as the server is shutdown cleanly (it is effectively
an offline backup!), it does mean that all databases on the SQL Server are
not available for the given time.

John




[quoted text, click to view]

Nick Malik
12/16/2003 8:46:30 AM
it will work.

If it bothers you to a great extent, you could write a SQL-DMO application
that does the work for him :-)

--- Nick

[quoted text, click to view]

AddThis Social Bookmark Button