Home > Archive > MS SQL Server > January 2006 > Copying database to same machine?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Copying database to same machine?
gman997

2006-01-26, 4:53 pm

Hi all,

I've read a lot of posts about copying a SQL database to a separate machine;
but, what about to the same machine.

In practice for others who have done what is the simplest reliable method?

Also, is there any reason not to detach the database, copy the physical
files (mdf and log) to a different name and reattach it under that other name?

Thanks!
David Gugick

2006-01-26, 4:53 pm

gman997 wrote:
> Hi all,
>
> I've read a lot of posts about copying a SQL database to a separate
> machine; but, what about to the same machine.
>
> In practice for others who have done what is the simplest reliable
> method?
>
> Also, is there any reason not to detach the database, copy the
> physical
> files (mdf and log) to a different name and reattach it under that
> other name?
>
> Thanks!


If you need this totally scripted, you should create the new database and
use backup/restore. If you don't mind taking the database offline and making
a copy, you can use detach/attach. Detach is probably faster if your
database can be taken offline. In any case, I would perform a full backup
before doing anything, and in that respect, it might just pay to restore to
a new database...

--
David Gugick
Quest Software


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com