Tuesday, March 20, 2012

Copy Database Wizard

I need to copy a database to the same server with a new name. The wizard
does not allow this, I would guess because it does an exact copy. Is there a
simple way to copy it to the same server with a different name?
Thanks,
DougThe copy database wizard will not work to the same server.
You can stop SQL Server. Make a copy of the files, renaming then in the
process. Then reattach with a different name using sp_attach_db
Or
Backup up the database and restore it with a different name using the WITH
MOVE option. There is an example in Books on Line under teh RESTORE command
of this.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Use the export function within EM to export the database and data into anoth
er database with a different name.
STurner|||you can either use the copy database wizard then do sp_renamedb or
you can use sp_detach_db, copy the files over as new names, the
sp_attach_db.. (both doc'd in books on line)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Doug Stiers" <doug@.nospam.com> wrote in message
news:evt5LaQPEHA.3096@.TK2MSFTNGP09.phx.gbl...
> I need to copy a database to the same server with a new name. The wizard
> does not allow this, I would guess because it does an exact copy. Is there
a
> simple way to copy it to the same server with a different name?
> Thanks,
> Doug
>

No comments:

Post a Comment