|
Home > Archive > MS SQL Server New Users > December 2005 > Restoring over an existing db on a different server
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 |
Restoring over an existing db on a different server
|
|
| rocky20 2005-12-05, 11:23 am |
| I am trying to restore a backup of Database1 on Server1 to overwrite the
existing Database2 on Server2 and keep running into an error.
The steps I followed were...
* On Server1 Database1, I backed up the database
* I move the .bak file to the new server (Server2)
* On Server2 I said Restore Database using the options Restore As Database2,
From Device (and selected the.bak file I created above), Force restore
over existing database, changed the Move to Physical File name to Overwrite
the existing file names of Database2 (e:\files\database1.mdf to
e:\files\database2.mdf), and Leave Database operational
When I attempt to restore it, it gives me an error that states that
Database2 is in use and I can not restore it.
How do I get around this?
Thanks
Mike
| |
| Andrew J. Kelly 2005-12-05, 8:25 pm |
| You need to kick out any users in the existing database2 before you can
restore to it. That means you as well if you have multiple connections open
to it. Try placing it in single user mode from the connection you will use
to restore from and you should be OK.
--
Andrew J. Kelly SQL MVP
"rocky20" <goldbond_8@hotmail.com> wrote in message
news:uD8tW2b%23FHA.2664@TK2MSFTNGP10.phx.gbl...
>I am trying to restore a backup of Database1 on Server1 to overwrite the
>existing Database2 on Server2 and keep running into an error.
>
> The steps I followed were...
> * On Server1 Database1, I backed up the database
> * I move the .bak file to the new server (Server2)
> * On Server2 I said Restore Database using the options Restore As
> Database2, From Device (and selected the.bak file I created above),
> Force restore over existing database, changed the Move to Physical File
> name to Overwrite the existing file names of Database2
> (e:\files\database1.mdf to e:\files\database2.mdf), and Leave Database
> operational
>
> When I attempt to restore it, it gives me an error that states that
> Database2 is in use and I can not restore it.
>
> How do I get around this?
>
> Thanks
> Mike
>
|
|
|
|
|