Wednesday, March 7, 2012

Restore new server different database name not working

I have a database on my new server:
tempFTS
From Properties:
FileName: tempFTS_Data Location: C:\Program Files\Microsoft Sql
Server\MSSQL\Data\tempFTS_DATA.MDF
Log: tempFTS_Log Location: C:\Program Files\Microsoft
Sql Server\MSSQL\Data\tempFTS_LOG.LDF
Backup from old Server:
FTS_db_200510180200.BAK
Right-Click tempFTS database and choose Restore Database
Select From Device
Select "Select Devices..."
Select Add
Double click on FTS_db_200510180200.BAK
Select OK
Go to Options and Displayed:
FTS_log d:\Microsoft SQL Server\MSSQL\data\FTS.ldf
FTS_dat d:\Microsoft SQL Server\MSSQL\data\FTS.mdf
This is where it originally was.
I now want to change the name to tempFTS
So I change the Logical fileNames to (AS shown above from the properties of
tempFTS:
tempFTS_Log
tempFTS_Data
I change the Physical names to where I want the new files to be located
C:\Program Files\Microsoft Sql Server\MSSQL\Data\tempFTS_DATA.MDF
C:\Program Files\Microsoft Sql Server\MSSQL\Data\tempFTS_LOG.LDF
Force Restore (just in case)
I now get the error:
Logical file 'tempFTS_Log', not part of the database "tempFTS".
I then tried to put the Logical names back to FTS_log and FTS_dat to see
what would happen there:
Now it tries to overwrite the FTS_Data.mdf, which is the old database that I
am restoring, but I want to put into TempFTS first to look at a couple of
tables.
What is the point of changing the Physical file names, if it is not going to
use them?
What did I do wrong?
Thanks,
Tom
Ok,
I got it to work.
This time it worked correctly. I am not sure why it wasn't working before
but I had to leave the Logical File Names the same as it found on the device
and change the Physical name to the folder and name that were in the new
Database (tempFTS).
It is just confusing in the way the window is laid out.
Where it says
Restore Database as:
Logical File Name --> really should say something like "Logical File Name
From Device". That was what was confusing. I thought I tried that before
and it didn't work.
So the left column (Logical File Name) is from the Device and the Move to
Physical File is where your new Database is pointing at (I think).
Tom
"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:OAkV7%23D1FHA.3820@.TK2MSFTNGP10.phx.gbl...
>I have a database on my new server:
> tempFTS
> From Properties:
> FileName: tempFTS_Data Location: C:\Program Files\Microsoft Sql
> Server\MSSQL\Data\tempFTS_DATA.MDF
> Log: tempFTS_Log Location: C:\Program Files\Microsoft
> Sql Server\MSSQL\Data\tempFTS_LOG.LDF
> Backup from old Server:
> FTS_db_200510180200.BAK
> Right-Click tempFTS database and choose Restore Database
> Select From Device
> Select "Select Devices..."
> Select Add
> Double click on FTS_db_200510180200.BAK
> Select OK
> Go to Options and Displayed:
> FTS_log d:\Microsoft SQL Server\MSSQL\data\FTS.ldf
> FTS_dat d:\Microsoft SQL Server\MSSQL\data\FTS.mdf
> This is where it originally was.
> I now want to change the name to tempFTS
> So I change the Logical fileNames to (AS shown above from the properties
> of tempFTS:
> tempFTS_Log
> tempFTS_Data
> I change the Physical names to where I want the new files to be located
> C:\Program Files\Microsoft Sql Server\MSSQL\Data\tempFTS_DATA.MDF
> C:\Program Files\Microsoft Sql Server\MSSQL\Data\tempFTS_LOG.LDF
> Force Restore (just in case)
> I now get the error:
> Logical file 'tempFTS_Log', not part of the database "tempFTS".
> I then tried to put the Logical names back to FTS_log and FTS_dat to see
> what would happen there:
> Now it tries to overwrite the FTS_Data.mdf, which is the old database that
> I am restoring, but I want to put into TempFTS first to look at a couple
> of tables.
> What is the point of changing the Physical file names, if it is not going
> to use them?
> What did I do wrong?
> Thanks,
> Tom
>

No comments:

Post a Comment