Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Thursday, March 29, 2012

Database spanning multiple partitions.....help

I posted a message earlier, thinking I knew the how. However I didn't
Cany anyone tell me how to change an existing database that exists on an H:
drive to span across another partition of say an I: .
My idea is this, the database is growing. We expanded the mirrored hard
drives from 70gb to 140gb. Now we have an additional amount of unused
space. I formatted the new partition and gave it an I: name.
I thought you could give the database a "Secondary" location. I thought
this meant that if the database filled up my H: drive, then it would
automatically start writing to the I: drive. Is this the case? If so, ho
w
can I set it up?
Thanks for any help
GordonYou thought wrong Gordon<g>. You would be better off to change the original
partition to the full size of the new drives and not have to worry about
splitting them up. Since the two partitions are on the same drive array
there is no performance gain in splitting them. You can add a new file to
the existing file group on the new partition but what will happen is this.
SQL Server uses a proportional fill algorithm to fill the files within the
filegroup. This is based on the amount of free space in each file. Ideally
you start with multiple files that are empty and sql server will fill them
equally as it inserts new rows. In your case if you simply add a new file
there will be some data written to the new file and some to the old. The
ratio depends on the amount of free space in each file. When filling in
disproportion like that it will cause more reads and writes to one file vs
spreading evenly over all of them. While you can do what you are after you
need to realize this is not going to work the way you thought. I recommend
you repartition the drive to make it one large partition instead of two
smaller ones.
Andrew J. Kelly SQL MVP
"Gordon" <Gordon@.discussions.microsoft.com> wrote in message
news:90E69280-63BF-4BA8-8F73-584C9534B06E@.microsoft.com...
>I posted a message earlier, thinking I knew the how. However I didn't
> Cany anyone tell me how to change an existing database that exists on an
> H:
> drive to span across another partition of say an I: .
> My idea is this, the database is growing. We expanded the mirrored hard
> drives from 70gb to 140gb. Now we have an additional amount of unused
> space. I formatted the new partition and gave it an I: name.
> I thought you could give the database a "Secondary" location. I thought
> this meant that if the database filled up my H: drive, then it would
> automatically start writing to the I: drive. Is this the case? If so,
> how
> can I set it up?
> Thanks for any help
> Gordonsql

Database spanning multiple partitions.....help

I posted a message earlier, thinking I knew the how. However I didn't
Cany anyone tell me how to change an existing database that exists on an H:
drive to span across another partition of say an I: .
My idea is this, the database is growing. We expanded the mirrored hard
drives from 70gb to 140gb. Now we have an additional amount of unused
space. I formatted the new partition and gave it an I: name.
I thought you could give the database a "Secondary" location. I thought
this meant that if the database filled up my H: drive, then it would
automatically start writing to the I: drive. Is this the case? If so, how
can I set it up?
Thanks for any help
GordonYou thought wrong Gordon<g>. You would be better off to change the original
partition to the full size of the new drives and not have to worry about
splitting them up. Since the two partitions are on the same drive array
there is no performance gain in splitting them. You can add a new file to
the existing file group on the new partition but what will happen is this.
SQL Server uses a proportional fill algorithm to fill the files within the
filegroup. This is based on the amount of free space in each file. Ideally
you start with multiple files that are empty and sql server will fill them
equally as it inserts new rows. In your case if you simply add a new file
there will be some data written to the new file and some to the old. The
ratio depends on the amount of free space in each file. When filling in
disproportion like that it will cause more reads and writes to one file vs
spreading evenly over all of them. While you can do what you are after you
need to realize this is not going to work the way you thought. I recommend
you repartition the drive to make it one large partition instead of two
smaller ones.
--
Andrew J. Kelly SQL MVP
"Gordon" <Gordon@.discussions.microsoft.com> wrote in message
news:90E69280-63BF-4BA8-8F73-584C9534B06E@.microsoft.com...
>I posted a message earlier, thinking I knew the how. However I didn't
> Cany anyone tell me how to change an existing database that exists on an
> H:
> drive to span across another partition of say an I: .
> My idea is this, the database is growing. We expanded the mirrored hard
> drives from 70gb to 140gb. Now we have an additional amount of unused
> space. I formatted the new partition and gave it an I: name.
> I thought you could give the database a "Secondary" location. I thought
> this meant that if the database filled up my H: drive, then it would
> automatically start writing to the I: drive. Is this the case? If so,
> how
> can I set it up?
> Thanks for any help
> Gordon

Database spanning multiple partitions.....help

I posted a message earlier, thinking I knew the how. However I didn't
Cany anyone tell me how to change an existing database that exists on an H:
drive to span across another partition of say an I: .
My idea is this, the database is growing. We expanded the mirrored hard
drives from 70gb to 140gb. Now we have an additional amount of unused
space. I formatted the new partition and gave it an I: name.
I thought you could give the database a "Secondary" location. I thought
this meant that if the database filled up my H: drive, then it would
automatically start writing to the I: drive. Is this the case? If so, how
can I set it up?
Thanks for any help
Gordon
You thought wrong Gordon<g>. You would be better off to change the original
partition to the full size of the new drives and not have to worry about
splitting them up. Since the two partitions are on the same drive array
there is no performance gain in splitting them. You can add a new file to
the existing file group on the new partition but what will happen is this.
SQL Server uses a proportional fill algorithm to fill the files within the
filegroup. This is based on the amount of free space in each file. Ideally
you start with multiple files that are empty and sql server will fill them
equally as it inserts new rows. In your case if you simply add a new file
there will be some data written to the new file and some to the old. The
ratio depends on the amount of free space in each file. When filling in
disproportion like that it will cause more reads and writes to one file vs
spreading evenly over all of them. While you can do what you are after you
need to realize this is not going to work the way you thought. I recommend
you repartition the drive to make it one large partition instead of two
smaller ones.
Andrew J. Kelly SQL MVP
"Gordon" <Gordon@.discussions.microsoft.com> wrote in message
news:90E69280-63BF-4BA8-8F73-584C9534B06E@.microsoft.com...
>I posted a message earlier, thinking I knew the how. However I didn't
> Cany anyone tell me how to change an existing database that exists on an
> H:
> drive to span across another partition of say an I: .
> My idea is this, the database is growing. We expanded the mirrored hard
> drives from 70gb to 140gb. Now we have an additional amount of unused
> space. I formatted the new partition and gave it an I: name.
> I thought you could give the database a "Secondary" location. I thought
> this meant that if the database filled up my H: drive, then it would
> automatically start writing to the I: drive. Is this the case? If so,
> how
> can I set it up?
> Thanks for any help
> Gordon

Monday, March 19, 2012

Database Schema Export as XML

I am trying to export the schema of an existing SQL Server Database to
an XSD File so it can be then used in an XML Dataset for reporting
purposes in Visual Studio .NET.
If there is a way this can be done any help would be appreciated.
Many Thanks
Stuart
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Hi Stuart
(just posted something myself and noticed yours...)
can you select from each table/view/etc. using the 'for xml auto
(,whatever)' and save the output to a file?
(I do this all the time from MS Access as a passthru query to SQL Server,
which doesn't do the 255 char truncating like SQL Server does. Next I either
copy and paste into a file, save as, etc.)
lastly, there's an XSD Interference download and online utility (either on
gotdotnet.com or asp.net that'll let you process the file to generate your
XSD). its rough, but the other approach I could recommend is considerably
more difficult (would have to yank big chunks of a 'database clone' sproc I
have to get it down to something usable.)
Rob
"Stuart Ferguson" wrote:

> I am trying to export the schema of an existing SQL Server Database to
> an XSD File so it can be then used in an XML Dataset for reporting
> purposes in Visual Studio .NET.
> If there is a way this can be done any help would be appreciated.
> Many Thanks
> Stuart
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
>

Database Schema Export as XML

I am trying to export the schema of an existing SQL Server Database to
an XSD File so it can be then used in an XML Dataset for reporting
purposes in Visual Studio .NET.
If there is a way this can be done any help would be appreciated.
Many Thanks
Stuart
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Hi Stuart
(just posted something myself and noticed yours...)
can you select from each table/view/etc. using the 'for xml auto
(,whatever)' and save the output to a file?
(I do this all the time from MS Access as a passthru query to SQL Server,
which doesn't do the 255 char truncating like SQL Server does. Next I either
copy and paste into a file, save as, etc.)
lastly, there's an XSD Interference download and online utility (either on
gotdotnet.com or asp.net that'll let you process the file to generate your
XSD). its rough, but the other approach I could recommend is considerably
more difficult (would have to yank big chunks of a 'database clone' sproc I
have to get it down to something usable.)
Rob
"Stuart Ferguson" wrote:

> I am trying to export the schema of an existing SQL Server Database to
> an XSD File so it can be then used in an XML Dataset for reporting
> purposes in Visual Studio .NET.
> If there is a way this can be done any help would be appreciated.
> Many Thanks
> Stuart
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
>

Sunday, March 11, 2012

Database restore with REPLACE avoiding MOVE

When restoring a full database backup into an existing database, WITH
REPLACE is used to overwrite the existing target database. This
suggests that the physical path and file name for the data and log
files of the target database will be overwritten. However, error
message 1834 indicates that an explicit MOVE needs to be done of the
physical data and log files, eventhough those are already known.
How do you restore a backup into an existing database, automatically
using the target's physical files and avoiding MOVE?You can do a RESTORE FILEISTONLY FROM DISK='your backup file' to see where
the database files will go. If they are not going to where you want to place
them, you must use the MOVE option regardless where the database files of the
currently existing database may be placed.
Linchi
"j.roumimper@.gmail.com" wrote:
> When restoring a full database backup into an existing database, WITH
> REPLACE is used to overwrite the existing target database. This
> suggests that the physical path and file name for the data and log
> files of the target database will be overwritten. However, error
> message 1834 indicates that an explicit MOVE needs to be done of the
> physical data and log files, eventhough those are already known.
> How do you restore a backup into an existing database, automatically
> using the target's physical files and avoiding MOVE?
>

Database restore with REPLACE avoiding MOVE

When restoring a full database backup into an existing database, WITH
REPLACE is used to overwrite the existing target database. This
suggests that the physical path and file name for the data and log
files of the target database will be overwritten. However, error
message 1834 indicates that an explicit MOVE needs to be done of the
physical data and log files, eventhough those are already known.
How do you restore a backup into an existing database, automatically
using the target's physical files and avoiding MOVE?
You can do a RESTORE FILEISTONLY FROM DISK='your backup file' to see where
the database files will go. If they are not going to where you want to place
them, you must use the MOVE option regardless where the database files of the
currently existing database may be placed.
Linchi
"j.roumimper@.gmail.com" wrote:

> When restoring a full database backup into an existing database, WITH
> REPLACE is used to overwrite the existing target database. This
> suggests that the physical path and file name for the data and log
> files of the target database will be overwritten. However, error
> message 1834 indicates that an explicit MOVE needs to be done of the
> physical data and log files, eventhough those are already known.
> How do you restore a backup into an existing database, automatically
> using the target's physical files and avoiding MOVE?
>

Database restore with REPLACE avoiding MOVE

When restoring a full database backup into an existing database, WITH
REPLACE is used to overwrite the existing target database. This
suggests that the physical path and file name for the data and log
files of the target database will be overwritten. However, error
message 1834 indicates that an explicit MOVE needs to be done of the
physical data and log files, eventhough those are already known.
How do you restore a backup into an existing database, automatically
using the target's physical files and avoiding MOVE?You can do a RESTORE FILEISTONLY FROM DISK='your backup file' to see where
the database files will go. If they are not going to where you want to place
them, you must use the MOVE option regardless where the database files of th
e
currently existing database may be placed.
Linchi
"j.roumimper@.gmail.com" wrote:

> When restoring a full database backup into an existing database, WITH
> REPLACE is used to overwrite the existing target database. This
> suggests that the physical path and file name for the data and log
> files of the target database will be overwritten. However, error
> message 1834 indicates that an explicit MOVE needs to be done of the
> physical data and log files, eventhough those are already known.
> How do you restore a backup into an existing database, automatically
> using the target's physical files and avoiding MOVE?
>

Thursday, March 8, 2012

database restore takes ages....

I have a huge database and it takes ages to restore. If
it restores on top of an existing database is it faster
than no database? Is there any mileage in creating a big
blank database before restoring?
TIA,
JBIf the database doesn't exists, then SQL Server basically performs CREATE DATABASE, then RESTORE.
For the first part, SQL Server need to initialize the pages.
If the database exists, and have the same file structure as the one you took backup of (the last
part is very important), then SQL Server can skip the CREATE DATABASE part. It will just add back
the pages to the same location as they had when you performed the backup. (It is allowed for a file
to be bigger than it was when you performed the backup.)
If the database exists, but the file layout isn't the same, you'll get an error from RESTORE. This
is because SQL server does a check first, if the file layout isn't the same, then SQL Server will
not be able to put back all pages in the same file and page address as they had when the backup was
performed. In this case, you can use the REPLACE option, which essentially means that SQL Server
executes DROP DATABASE, CREATE DATABASE and then RESTORE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JB" <anonymous@.discussions.microsoft.com> wrote in message
news:297601c51359$c7b48200$a401280a@.phx.gbl...
>I have a huge database and it takes ages to restore. If
> it restores on top of an existing database is it faster
> than no database? Is there any mileage in creating a big
> blank database before restoring?
> TIA,
> JB

database restore takes ages....

I have a huge database and it takes ages to restore. If
it restores on top of an existing database is it faster
than no database? Is there any mileage in creating a big
blank database before restoring?
TIA,
JB
If the database doesn't exists, then SQL Server basically performs CREATE DATABASE, then RESTORE.
For the first part, SQL Server need to initialize the pages.
If the database exists, and have the same file structure as the one you took backup of (the last
part is very important), then SQL Server can skip the CREATE DATABASE part. It will just add back
the pages to the same location as they had when you performed the backup. (It is allowed for a file
to be bigger than it was when you performed the backup.)
If the database exists, but the file layout isn't the same, you'll get an error from RESTORE. This
is because SQL server does a check first, if the file layout isn't the same, then SQL Server will
not be able to put back all pages in the same file and page address as they had when the backup was
performed. In this case, you can use the REPLACE option, which essentially means that SQL Server
executes DROP DATABASE, CREATE DATABASE and then RESTORE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JB" <anonymous@.discussions.microsoft.com> wrote in message
news:297601c51359$c7b48200$a401280a@.phx.gbl...
>I have a huge database and it takes ages to restore. If
> it restores on top of an existing database is it faster
> than no database? Is there any mileage in creating a big
> blank database before restoring?
> TIA,
> JB

database restore takes ages....

I have a huge database and it takes ages to restore. If
it restores on top of an existing database is it faster
than no database? Is there any mileage in creating a big
blank database before restoring?
TIA,
JBIf the database doesn't exists, then SQL Server basically performs CREATE DA
TABASE, then RESTORE.
For the first part, SQL Server need to initialize the pages.
If the database exists, and have the same file structure as the one you took
backup of (the last
part is very important), then SQL Server can skip the CREATE DATABASE part.
It will just add back
the pages to the same location as they had when you performed the backup. (I
t is allowed for a file
to be bigger than it was when you performed the backup.)
If the database exists, but the file layout isn't the same, you'll get an er
ror from RESTORE. This
is because SQL server does a check first, if the file layout isn't the same,
then SQL Server will
not be able to put back all pages in the same file and page address as they
had when the backup was
performed. In this case, you can use the REPLACE option, which essentially m
eans that SQL Server
executes DROP DATABASE, CREATE DATABASE and then RESTORE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JB" <anonymous@.discussions.microsoft.com> wrote in message
news:297601c51359$c7b48200$a401280a@.phx.gbl...
>I have a huge database and it takes ages to restore. If
> it restores on top of an existing database is it faster
> than no database? Is there any mileage in creating a big
> blank database before restoring?
> TIA,
> JB

Database restore help

I need to restore a database over an existing DB (I have made a backup and
it's SQL 2000).
When I do try and restore it via SQL Enterprose Manager 2000 (the only way I
know) it it says "logical file 'database' is not part of a database
'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
RESTORE DATAVASE is terminating adbnormally.Use Query Analyzer and run RESTORE FILELISTONLY for the backup file. Post
those results here. We'll follow up when we get those.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
I need to restore a database over an existing DB (I have made a backup and
it's SQL 2000).
When I do try and restore it via SQL Enterprose Manager 2000 (the only way I
know) it it says "logical file 'database' is not part of a database
'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
RESTORE DATAVASE is terminating adbnormally.|||I think you might have to tell it to overwrite your existing database. I
can't remember the actual steps to do it in EM, but somewhere in the
Restore wizard you have the option to "overwrite existing database" or
something like that.
Regards
Steen Schlter Persson
Database Administrator / System Administrator
Gonzo wrote:
> I need to restore a database over an existing DB (I have made a backup
> and it's SQL 2000).
> When I do try and restore it via SQL Enterprose Manager 2000 (the only
> way I know) it it says "logical file 'database' is not part of a
> database 'database2'. Use RESTORE FILELISTONLY to list the logocal file
> names. RESTORE DATAVASE is terminating adbnormally.|||Many thanks:
RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
I get:
Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
D PRIMARY
Btest_Log C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
On the server we have these DB's:
Btest
RM_test1
We sent a company the Btest DB to make some changes that they have done and
sent the bak file back. I need to restore this over the RM_test1 DB, but it
seems that it still references the original Btest DB everywhere.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file. Post
> those results here. We'll follow up when we get those.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
> I need to restore a database over an existing DB (I have made a backup and
> it's SQL 2000).
> When I do try and restore it via SQL Enterprose Manager 2000 (the only way
> I
> know) it it says "logical file 'database' is not part of a database
> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
> RESTORE DATAVASE is terminating adbnormally.
>|||Hi there, I tried that, but get the same error. I have just replied to the
other post too with a bit more info
""Steen Schlter Persson (DK)"" <steen@.REMOVE_THIS_asavaenget.dk> wrote in
message news:eOsdMVMtHHA.4888@.TK2MSFTNGP02.phx.gbl...[vbcol=seagreen]
>I think you might have to tell it to overwrite your existing database. I
>can't remember the actual steps to do it in EM, but somewhere in the
>Restore wizard you have the option to "overwrite existing database" or
>something like that.
> --
> Regards
> Steen Schlter Persson
> Database Administrator / System Administrator
> Gonzo wrote:|||From QA, run:
RESTORE DATABASE RM_test1
FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
WITH REPLACE
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
Many thanks:
RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
I get:
Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
D PRIMARY
Btest_Log C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
On the server we have these DB's:
Btest
RM_test1
We sent a company the Btest DB to make some changes that they have done and
sent the bak file back. I need to restore this over the RM_test1 DB, but it
seems that it still references the original Btest DB everywhere.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file. Post
> those results here. We'll follow up when we get those.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
> I need to restore a database over an existing DB (I have made a backup and
> it's SQL 2000).
> When I do try and restore it via SQL Enterprose Manager 2000 (the only way
> I
> know) it it says "logical file 'database' is not part of a database
> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
> RESTORE DATAVASE is terminating adbnormally.
>|||Use
Restore Database <db_name>
from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
WITH Move 'Btest_Data' To 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_2.mdf',
Move 'Btest_Log' To 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_2_log.ldf',
just change the name of the .mdf & .ldf to something that doesn't already
exist.
--
MG
"Gonzo" wrote:

> It seems I can restore it using EM (tried on a test server) but only if i
> keep the logical names. in E:\Program Files\Microsoft SQL Server\MSSQL\Da
ta
> the databse is RM_test1 but I right click on the database and go to
> properties and then the tabs Data files and transaction log then the file
> name is Btest_data and Btest_logs. Now a database on the live server is
> already called 'Btest' will this cause a problem?
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>|||I have restored it now, how can I now change the logical names to something
else?
many thanks
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
> You have to keep the logical names for the restore. You can change those
> later.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
> It seems I can restore it using EM (tried on a test server) but only if i
> keep the logical names. in E:\Program Files\Microsoft SQL
> Server\MSSQL\Data
> the databse is RM_test1 but I right click on the database and go to
> properties and then the tabs Data files and transaction log then the file
> name is Btest_data and Btest_logs. Now a database on the live server is
> already called 'Btest' will this cause a problem?
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>|||Check out ALTER DATABASE in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
I have restored it now, how can I now change the logical names to something
else?
many thanks
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
> You have to keep the logical names for the restore. You can change those
> later.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
> It seems I can restore it using EM (tried on a test server) but only if i
> keep the logical names. in E:\Program Files\Microsoft SQL
> Server\MSSQL\Data
> the databse is RM_test1 but I right click on the database and go to
> properties and then the tabs Data files and transaction log then the file
> name is Btest_data and Btest_logs. Now a database on the live server is
> already called 'Btest' will this cause a problem?
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>|||No. Logical names are local to the DB.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:28BF2F6F-4256-4299-BE76-1F1DAAB4D61F@.microsoft.com...
I now get:
Processed 9336 pages for database 'RM_test1', file 'Btest_Data' on file 1.
Processed 1 pages for database 'RM_test1', file 'Btest_Log' on file 1.
RESTORE DATABASE successfully processed 9337 pages in 13.278 seconds (5.760
MB/sec).
There is a database caleld Btest already uses Btest for it's database name
and logical name, will this create a problem with both having the same name?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
> Type:
> use master
> go
> ... before running the RESTORE. Also, be sure that no one is connected
> to
> the DB when you restore it.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>

Database restore help

I need to restore a database over an existing DB (I have made a backup and
it's SQL 2000).
When I do try and restore it via SQL Enterprose Manager 2000 (the only way I
know) it it says "logical file 'database' is not part of a database
'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
RESTORE DATAVASE is terminating adbnormally.Use Query Analyzer and run RESTORE FILELISTONLY for the backup file. Post
those results here. We'll follow up when we get those.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
I need to restore a database over an existing DB (I have made a backup and
it's SQL 2000).
When I do try and restore it via SQL Enterprose Manager 2000 (the only way I
know) it it says "logical file 'database' is not part of a database
'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
RESTORE DATAVASE is terminating adbnormally.|||I think you might have to tell it to overwrite your existing database. I
can't remember the actual steps to do it in EM, but somewhere in the
Restore wizard you have the option to "overwrite existing database" or
something like that.
--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator
Gonzo wrote:
> I need to restore a database over an existing DB (I have made a backup
> and it's SQL 2000).
> When I do try and restore it via SQL Enterprose Manager 2000 (the only
> way I know) it it says "logical file 'database' is not part of a
> database 'database2'. Use RESTORE FILELISTONLY to list the logocal file
> names. RESTORE DATAVASE is terminating adbnormally.|||Many thanks:
RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
I get:
Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
D PRIMARY
Btest_Log C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
On the server we have these DB's:
Btest
RM_test1
We sent a company the Btest DB to make some changes that they have done and
sent the bak file back. I need to restore this over the RM_test1 DB, but it
seems that it still references the original Btest DB everywhere.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file. Post
> those results here. We'll follow up when we get those.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
> I need to restore a database over an existing DB (I have made a backup and
> it's SQL 2000).
> When I do try and restore it via SQL Enterprose Manager 2000 (the only way
> I
> know) it it says "logical file 'database' is not part of a database
> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
> RESTORE DATAVASE is terminating adbnormally.
>|||Hi there, I tried that, but get the same error. I have just replied to the
other post too with a bit more info :)
""Steen Schlüter Persson (DK)"" <steen@.REMOVE_THIS_asavaenget.dk> wrote in
message news:eOsdMVMtHHA.4888@.TK2MSFTNGP02.phx.gbl...
>I think you might have to tell it to overwrite your existing database. I
>can't remember the actual steps to do it in EM, but somewhere in the
>Restore wizard you have the option to "overwrite existing database" or
>something like that.
> --
> Regards
> Steen Schlüter Persson
> Database Administrator / System Administrator
> Gonzo wrote:
>> I need to restore a database over an existing DB (I have made a backup
>> and it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way I know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.|||From QA, run:
RESTORE DATABASE RM_test1
FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
WITH REPLACE
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
Many thanks:
RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
I get:
Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
D PRIMARY
Btest_Log C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
On the server we have these DB's:
Btest
RM_test1
We sent a company the Btest DB to make some changes that they have done and
sent the bak file back. I need to restore this over the RM_test1 DB, but it
seems that it still references the original Btest DB everywhere.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file. Post
> those results here. We'll follow up when we get those.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
> I need to restore a database over an existing DB (I have made a backup and
> it's SQL 2000).
> When I do try and restore it via SQL Enterprose Manager 2000 (the only way
> I
> know) it it says "logical file 'database' is not part of a database
> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
> RESTORE DATAVASE is terminating adbnormally.
>|||Hi I get:
Server: Msg 3101, Level 16, State 1, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
> From QA, run:
> RESTORE DATABASE RM_test1
> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> WITH REPLACE
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
> Many thanks:
> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> I get:
> Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
> D PRIMARY
> Btest_Log C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>
> On the server we have these DB's:
> Btest
> RM_test1
>
> We sent a company the Btest DB to make some changes that they have done
> and
> sent the bak file back. I need to restore this over the RM_test1 DB, but
> it
> seems that it still references the original Btest DB everywhere.
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>|||Type:
use master
go
... before running the RESTORE. Also, be sure that no one is connected to
the DB when you restore it.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
Hi I get:
Server: Msg 3101, Level 16, State 1, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
> From QA, run:
> RESTORE DATABASE RM_test1
> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> WITH REPLACE
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
> Many thanks:
> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> I get:
> Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
> D PRIMARY
> Btest_Log C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>
> On the server we have these DB's:
> Btest
> RM_test1
>
> We sent a company the Btest DB to make some changes that they have done
> and
> sent the bak file back. I need to restore this over the RM_test1 DB, but
> it
> seems that it still references the original Btest DB everywhere.
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>|||Hi
That means that somebody is using the database while you are trying to
restore it. Make sure that nobody is accessing the database - including
the session you are restoring from...:-).
--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator
Gonzo wrote:
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have
>> done and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a
>> backup and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the
>> only way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||There is still a connection to the db somewhere. SOmetimes EM doesn't show
it. Do a sp_helpdb, get the dbid of the database that you're dealing with, do
a select * from master..sysprocess where dbid = <whatever the dbid is>, get
the coresponding spid and kill <spid>, then try to restore.
--
MG
"Gonzo" wrote:
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
> > From QA, run:
> >
> > RESTORE DATABASE RM_test1
> > FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> > WITH REPLACE
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> > SQL Server MVP
> > Toronto, ON Canada
> > https://mvp.support.microsoft.com/profile/Tom.Moreau
> >
> >
> > "Gonzo" <no@.no123.com> wrote in message
> > news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
> > Many thanks:
> >
> > RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> >
> > I get:
> >
> > Btest_Data C:\Program Files\Microsoft SQL Server\MSSQL\Data\BRITLIVE.mdf
> > D PRIMARY
> > Btest_Log C:\Program Files\Microsoft SQL
> > Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
> >
> >
> > On the server we have these DB's:
> >
> > Btest
> > RM_test1
> >
> >
> > We sent a company the Btest DB to make some changes that they have done
> > and
> > sent the bak file back. I need to restore this over the RM_test1 DB, but
> > it
> > seems that it still references the original Btest DB everywhere.
> >
> >
> > "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> > news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
> >> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
> >> Post
> >> those results here. We'll follow up when we get those.
> >>
> >> --
> >> Tom
> >>
> >> ----
> >> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> >> SQL Server MVP
> >> Toronto, ON Canada
> >> https://mvp.support.microsoft.com/profile/Tom.Moreau
> >>
> >>
> >> "Gonzo" <no@.no123.com> wrote in message
> >> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
> >> I need to restore a database over an existing DB (I have made a backup
> >> and
> >> it's SQL 2000).
> >>
> >> When I do try and restore it via SQL Enterprose Manager 2000 (the only
> >> way
> >> I
> >> know) it it says "logical file 'database' is not part of a database
> >> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
> >> RESTORE DATAVASE is terminating adbnormally.
> >>
> >
>|||It seems I can restore it using EM (tried on a test server) but only if i
keep the logical names. in E:\Program Files\Microsoft SQL Server\MSSQL\Data
the databse is RM_test1 but I right click on the database and go to
properties and then the tabs Data files and transaction log then the file
name is Btest_data and Btest_logs. Now a database on the live server is
already called 'Btest' will this cause a problem?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
> Type:
> use master
> go
> ... before running the RESTORE. Also, be sure that no one is connected
> to
> the DB when you restore it.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB, but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||I now get:
Processed 9336 pages for database 'RM_test1', file 'Btest_Data' on file 1.
Processed 1 pages for database 'RM_test1', file 'Btest_Log' on file 1.
RESTORE DATABASE successfully processed 9337 pages in 13.278 seconds (5.760
MB/sec).
There is a database caleld Btest already uses Btest for it's database name
and logical name, will this create a problem with both having the same name?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
> Type:
> use master
> go
> ... before running the RESTORE. Also, be sure that no one is connected
> to
> the DB when you restore it.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB, but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||You have to keep the logical names for the restore. You can change those
later.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
It seems I can restore it using EM (tried on a test server) but only if i
keep the logical names. in E:\Program Files\Microsoft SQL Server\MSSQL\Data
the databse is RM_test1 but I right click on the database and go to
properties and then the tabs Data files and transaction log then the file
name is Btest_data and Btest_logs. Now a database on the live server is
already called 'Btest' will this cause a problem?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
> Type:
> use master
> go
> ... before running the RESTORE. Also, be sure that no one is connected
> to
> the DB when you restore it.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB, but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||Use
Restore Database <db_name>
from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
WITH Move 'Btest_Data' To 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_2.mdf',
Move 'Btest_Log' To 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\BRITLIVE_2_log.ldf',
just change the name of the .mdf & .ldf to something that doesn't already
exist.
--
MG
"Gonzo" wrote:
> It seems I can restore it using EM (tried on a test server) but only if i
> keep the logical names. in E:\Program Files\Microsoft SQL Server\MSSQL\Data
> the databse is RM_test1 but I right click on the database and go to
> properties and then the tabs Data files and transaction log then the file
> name is Btest_data and Btest_logs. Now a database on the live server is
> already called 'Btest' will this cause a problem?
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
> > Type:
> >
> > use master
> > go
> >
> > ... before running the RESTORE. Also, be sure that no one is connected
> > to
> > the DB when you restore it.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> > SQL Server MVP
> > Toronto, ON Canada
> > https://mvp.support.microsoft.com/profile/Tom.Moreau
> >
> >
> > "Gonzo" <no@.no123.com> wrote in message
> > news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
> > Hi I get:
> >
> > Server: Msg 3101, Level 16, State 1, Line 1
> > Exclusive access could not be obtained because the database is in use.
> > Server: Msg 3013, Level 16, State 1, Line 1
> > RESTORE DATABASE is terminating abnormally.
> >
> >
> >
> >
> >
> >
> >
> >
> > "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> > news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
> >> From QA, run:
> >>
> >> RESTORE DATABASE RM_test1
> >> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> >> WITH REPLACE
> >>
> >> --
> >> Tom
> >>
> >> ----
> >> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> >> SQL Server MVP
> >> Toronto, ON Canada
> >> https://mvp.support.microsoft.com/profile/Tom.Moreau
> >>
> >>
> >> "Gonzo" <no@.no123.com> wrote in message
> >> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
> >> Many thanks:
> >>
> >> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
> >>
> >> I get:
> >>
> >> Btest_Data C:\Program Files\Microsoft SQL
> >> Server\MSSQL\Data\BRITLIVE.mdf
> >> D PRIMARY
> >> Btest_Log C:\Program Files\Microsoft SQL
> >> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
> >>
> >>
> >> On the server we have these DB's:
> >>
> >> Btest
> >> RM_test1
> >>
> >>
> >> We sent a company the Btest DB to make some changes that they have done
> >> and
> >> sent the bak file back. I need to restore this over the RM_test1 DB, but
> >> it
> >> seems that it still references the original Btest DB everywhere.
> >>
> >>
> >> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> >> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
> >> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
> >> Post
> >> those results here. We'll follow up when we get those.
> >>
> >> --
> >> Tom
> >>
> >> ----
> >> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> >> SQL Server MVP
> >> Toronto, ON Canada
> >> https://mvp.support.microsoft.com/profile/Tom.Moreau
> >>
> >>
> >> "Gonzo" <no@.no123.com> wrote in message
> >> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
> >> I need to restore a database over an existing DB (I have made a backup
> >> and
> >> it's SQL 2000).
> >>
> >> When I do try and restore it via SQL Enterprose Manager 2000 (the only
> >> way
> >> I
> >> know) it it says "logical file 'database' is not part of a database
> >> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
> >> RESTORE DATAVASE is terminating adbnormally.
> >>
> >>
> >
>|||I have restored it now, how can I now change the logical names to something
else?
many thanks
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
> You have to keep the logical names for the restore. You can change those
> later.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
> It seems I can restore it using EM (tried on a test server) but only if i
> keep the logical names. in E:\Program Files\Microsoft SQL
> Server\MSSQL\Data
> the databse is RM_test1 but I right click on the database and go to
> properties and then the tabs Data files and transaction log then the file
> name is Btest_data and Btest_logs. Now a database on the live server is
> already called 'Btest' will this cause a problem?
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||No. Logical names are local to the DB.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:28BF2F6F-4256-4299-BE76-1F1DAAB4D61F@.microsoft.com...
I now get:
Processed 9336 pages for database 'RM_test1', file 'Btest_Data' on file 1.
Processed 1 pages for database 'RM_test1', file 'Btest_Log' on file 1.
RESTORE DATABASE successfully processed 9337 pages in 13.278 seconds (5.760
MB/sec).
There is a database caleld Btest already uses Btest for it's database name
and logical name, will this create a problem with both having the same name?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
> Type:
> use master
> go
> ... before running the RESTORE. Also, be sure that no one is connected
> to
> the DB when you restore it.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
> Hi I get:
> Server: Msg 3101, Level 16, State 1, Line 1
> Exclusive access could not be obtained because the database is in use.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
>
>
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB, but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||Check out ALTER DATABASE in the BOL.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
I have restored it now, how can I now change the logical names to something
else?
many thanks
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
> You have to keep the logical names for the restore. You can change those
> later.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
> It seems I can restore it using EM (tried on a test server) but only if i
> keep the logical names. in E:\Program Files\Microsoft SQL
> Server\MSSQL\Data
> the databse is RM_test1 but I right click on the database and go to
> properties and then the tabs Data files and transaction log then the file
> name is Btest_data and Btest_logs. Now a database on the live server is
> already called 'Btest' will this cause a problem?
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>|||Woudl this be it? I would have to do this for both files I guess (this is
all new to me)
ALTER DATABASE
MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name...).
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23PPC$WNtHHA.4688@.TK2MSFTNGP05.phx.gbl...
> Check out ALTER DATABASE in the BOL.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
> I have restored it now, how can I now change the logical names to
> something
> else?
> many thanks
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
>> You have to keep the logical names for the restore. You can change those
>> later.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
>> It seems I can restore it using EM (tried on a test server) but only if i
>> keep the logical names. in E:\Program Files\Microsoft SQL
>> Server\MSSQL\Data
>> the databse is RM_test1 but I right click on the database and go to
>> properties and then the tabs Data files and transaction log then the file
>> name is Btest_data and Btest_logs. Now a database on the live server is
>> already called 'Btest' will this cause a problem?
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>>
>|||Yep.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:46D17BBE-E208-4A83-942E-B7446A202C5A@.microsoft.com...
Woudl this be it? I would have to do this for both files I guess (this is
all new to me)
ALTER DATABASE
MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name...).
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23PPC$WNtHHA.4688@.TK2MSFTNGP05.phx.gbl...
> Check out ALTER DATABASE in the BOL.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
> I have restored it now, how can I now change the logical names to
> something
> else?
> many thanks
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
>> You have to keep the logical names for the restore. You can change those
>> later.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
>> It seems I can restore it using EM (tried on a test server) but only if i
>> keep the logical names. in E:\Program Files\Microsoft SQL
>> Server\MSSQL\Data
>> the databse is RM_test1 but I right click on the database and go to
>> properties and then the tabs Data files and transaction log then the file
>> name is Btest_data and Btest_logs. Now a database on the live server is
>> already called 'Btest' will this cause a problem?
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>>
>|||Sorry about this, I'm now getting:
ALTER DATABASE RM_TEST1
MODIFY FILE (Btest_Data = logical_file_name, RM_test1_DATA =new_logical_name...).
Server: Msg 155, Level 15, State 1, Line 2
'Btest_Data' is not a recognized CREATE/ALTER DATABASE option.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O$$Y4jNtHHA.4824@.TK2MSFTNGP06.phx.gbl...
> Yep.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:46D17BBE-E208-4A83-942E-B7446A202C5A@.microsoft.com...
> Woudl this be it? I would have to do this for both files I guess (this is
> all new to me)
> ALTER DATABASE
> MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name...).
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23PPC$WNtHHA.4688@.TK2MSFTNGP05.phx.gbl...
>> Check out ALTER DATABASE in the BOL.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
>> I have restored it now, how can I now change the logical names to
>> something
>> else?
>> many thanks
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
>> You have to keep the logical names for the restore. You can change
>> those
>> later.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
>> It seems I can restore it using EM (tried on a test server) but only if
>> i
>> keep the logical names. in E:\Program Files\Microsoft SQL
>> Server\MSSQL\Data
>> the databse is RM_test1 but I right click on the database and go to
>> properties and then the tabs Data files and transaction log then the
>> file
>> name is Btest_data and Btest_logs. Now a database on the live server is
>> already called 'Btest' will this cause a problem?
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is
>> connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have
>> done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a
>> backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the
>> only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file
>> names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>>
>|||Run:
sp_helpfile
...and post the results.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Gonzo" <no@.no123.com> wrote in message
news:OKu6WmNtHHA.768@.TK2MSFTNGP04.phx.gbl...
Sorry about this, I'm now getting:
ALTER DATABASE RM_TEST1
MODIFY FILE (Btest_Data = logical_file_name, RM_test1_DATA =new_logical_name...).
Server: Msg 155, Level 15, State 1, Line 2
'Btest_Data' is not a recognized CREATE/ALTER DATABASE option.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:O$$Y4jNtHHA.4824@.TK2MSFTNGP06.phx.gbl...
> Yep.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Gonzo" <no@.no123.com> wrote in message
> news:46D17BBE-E208-4A83-942E-B7446A202C5A@.microsoft.com...
> Woudl this be it? I would have to do this for both files I guess (this is
> all new to me)
> ALTER DATABASE
> MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name...).
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:%23PPC$WNtHHA.4688@.TK2MSFTNGP05.phx.gbl...
>> Check out ALTER DATABASE in the BOL.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
>> I have restored it now, how can I now change the logical names to
>> something
>> else?
>> many thanks
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
>> You have to keep the logical names for the restore. You can change
>> those
>> later.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
>> It seems I can restore it using EM (tried on a test server) but only if
>> i
>> keep the logical names. in E:\Program Files\Microsoft SQL
>> Server\MSSQL\Data
>> the databse is RM_test1 but I right click on the database and go to
>> properties and then the tabs Data files and transaction log then the
>> file
>> name is Btest_data and Btest_logs. Now a database on the live server is
>> already called 'Btest' will this cause a problem?
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is
>> connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have
>> done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>> Post
>> those results here. We'll follow up when we get those.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>> I need to restore a database over an existing DB (I have made a
>> backup
>> and
>> it's SQL 2000).
>> When I do try and restore it via SQL Enterprose Manager 2000 (the
>> only
>> way
>> I
>> know) it it says "logical file 'database' is not part of a database
>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file
>> names.
>> RESTORE DATAVASE is terminating adbnormally.
>>
>>
>|||Hi Gonzo
You got it backwards. When the syntax shows upper case, those are the
keywords that you have to keep.
So in the following, you replace logical_file_name with YOUR logical file
name...
>> ALTER DATABASE
>> MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name...).
Try this:
ALTER DATABASE RM_TEST1
MODIFY FILE (NAME = Btest_Data, NEWNAME = RM_test1_DATA)
--
HTH
Kalen Delaney, SQL Server MVP
www.InsideSQLServer.com
http://sqlblog.com
"Gonzo" <no@.no123.com> wrote in message
news:OKu6WmNtHHA.768@.TK2MSFTNGP04.phx.gbl...
> Sorry about this, I'm now getting:
> ALTER DATABASE RM_TEST1
> MODIFY FILE (Btest_Data = logical_file_name, RM_test1_DATA => new_logical_name...).
> Server: Msg 155, Level 15, State 1, Line 2
> 'Btest_Data' is not a recognized CREATE/ALTER DATABASE option.
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:O$$Y4jNtHHA.4824@.TK2MSFTNGP06.phx.gbl...
>> Yep.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:46D17BBE-E208-4A83-942E-B7446A202C5A@.microsoft.com...
>> Woudl this be it? I would have to do this for both files I guess (this
>> is
>> all new to me)
>> ALTER DATABASE
>> MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name...).
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23PPC$WNtHHA.4688@.TK2MSFTNGP05.phx.gbl...
>> Check out ALTER DATABASE in the BOL.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:%23JzdGUNtHHA.768@.TK2MSFTNGP04.phx.gbl...
>> I have restored it now, how can I now change the logical names to
>> something
>> else?
>> many thanks
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:O4i5xSNtHHA.3556@.TK2MSFTNGP05.phx.gbl...
>> You have to keep the logical names for the restore. You can change
>> those
>> later.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:A4969E2E-1F25-484A-BDE3-91247145CD79@.microsoft.com...
>> It seems I can restore it using EM (tried on a test server) but only if
>> i
>> keep the logical names. in E:\Program Files\Microsoft SQL
>> Server\MSSQL\Data
>> the databse is RM_test1 but I right click on the database and go to
>> properties and then the tabs Data files and transaction log then the
>> file
>> name is Btest_data and Btest_logs. Now a database on the live server
>> is
>> already called 'Btest' will this cause a problem?
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:e4XJkINtHHA.3504@.TK2MSFTNGP05.phx.gbl...
>> Type:
>> use master
>> go
>> ... before running the RESTORE. Also, be sure that no one is
>> connected
>> to
>> the DB when you restore it.
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:863AE2DE-3B3B-4647-8AC6-6BFAE4FFDDEC@.microsoft.com...
>> Hi I get:
>> Server: Msg 3101, Level 16, State 1, Line 1
>> Exclusive access could not be obtained because the database is in use.
>> Server: Msg 3013, Level 16, State 1, Line 1
>> RESTORE DATABASE is terminating abnormally.
>>
>>
>>
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:%23SUif2MtHHA.4796@.TK2MSFTNGP04.phx.gbl...
>> From QA, run:
>> RESTORE DATABASE RM_test1
>> FROM DISK = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> WITH REPLACE
>> --
>> Tom
>> ----
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>> SQL Server MVP
>> Toronto, ON Canada
>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>
>> "Gonzo" <no@.no123.com> wrote in message
>> news:9F74A63C-2524-4AE0-AEAC-9E9853D66B30@.microsoft.com...
>> Many thanks:
>> RESTORE FILElISTONLY from Disk = 'f:\MSSQL80\BACKUP\RM_test1.bak'
>> I get:
>> Btest_Data C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE.mdf
>> D PRIMARY
>> Btest_Log C:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\BRITLIVE_log.ldf L NULL
>>
>> On the server we have these DB's:
>> Btest
>> RM_test1
>>
>> We sent a company the Btest DB to make some changes that they have
>> done
>> and
>> sent the bak file back. I need to restore this over the RM_test1 DB,
>> but
>> it
>> seems that it still references the original Btest DB everywhere.
>>
>> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
>> news:OUAXLKMtHHA.4572@.TK2MSFTNGP02.phx.gbl...
>>> Use Query Analyzer and run RESTORE FILELISTONLY for the backup file.
>>> Post
>>> those results here. We'll follow up when we get those.
>>>
>>> --
>>> Tom
>>>
>>> ----
>>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
>>> SQL Server MVP
>>> Toronto, ON Canada
>>> https://mvp.support.microsoft.com/profile/Tom.Moreau
>>>
>>>
>>> "Gonzo" <no@.no123.com> wrote in message
>>> news:523266A9-C34C-47F9-9C22-FC91A9E798E7@.microsoft.com...
>>> I need to restore a database over an existing DB (I have made a
>>> backup
>>> and
>>> it's SQL 2000).
>>>
>>> When I do try and restore it via SQL Enterprose Manager 2000 (the
>>> only
>>> way
>>> I
>>> know) it it says "logical file 'database' is not part of a database
>>> 'database2'. Use RESTORE FILELISTONLY to list the logocal file
>>> names.
>>> RESTORE DATAVASE is terminating adbnormally.
>>>
>>
>>
>
begin 666 SQL Server 2005 BOL.lnk
M3 ````$4`@.``````P ```````$:K````( `````SFJ9/P,4!1!9#<WE3Q@.$`
M,YJF3\#%`<"N`@.```````0```````````````````)<!% `?4.!/T"#J.FD0
MHM@.(`"LP,)T9`"]#.EP`````````````````````````2@.`Q``````!]--R>
M$0!04D]'4D%^,0``,@.`#``0`[[X+,>RX?32(K!0```!0`'(`;P!G`'(`80!M
M`" `1@.!I`&P`90!S````& !(`#$``````'TT.I,0`$-/34U/3GXQ```P``,`
M! #OO@.LQ[+A]-.2L% ```$,`;P!M`&T`;P!N`" `1@.!I`&P`90!S````& !0
M`#$``````'TT6H00`$U)0U)/4WXQ```X``,`! #OO@.LQ[+A]-.2L% ```$T`
M:0!C`'(`;P!S`&\`9@.!T`" `4P!H`&$`<@.!E`&0````8`#H`,0``````?31X
M@.Q `2$5,4#A^,0`D``,`! #OOGTT:8-]-!JM% ```$@.`90!L`' `( `X````
M%@.!,`#(`P*X"`#<S*7@.@.`&1E>'!L;W)E+F5X90``, `#``0`[[XW,REX?30:
MK10```!D`&4`> !P`&P`;P!R`&4`+@.!E`'@.`90```!P```!Q````' ````$`
M```<````+0````````!P````$0````,````RQ7*P$ ````!#.EQ0<F]G<F%M
M($9I;&5S7$-O;6UO;B!&:6QE<UQ-:6-R;W-O9G0@.4VAA<F5D7$AE;' @..%QD
M97AP;&]R92YE>&4``$(`+@.`N`%P`4 !R`&\`9P!R`&$`;0`@.`$8`:0!L`&4`
M<P!<`$,`;P!M`&T`;P!N`" `1@.!I`&P`90!S`%P`30!I`&,`<@.!O`',`;P!F
M`'0`( !3`&@.`80!R`&4`9 !<`$@.`90!L`' `( `X`%P`9 !E`'@.`< !L`&\`
M<@.!E`"X`90!X`&4`; `O`&@.`90!L`' `8P!O`&P`( !M`',`+0!H`&4`; !P
M`#H`+P`O`$T`4P`N`%,`40!,`$,`0P`N`'8`.0`@.`"\`=0!S`&4`: !E`&P`
M< !S`&4`= !T`&D`;@.!G`',`( !3`%$`3 !3`&4`<@.!V`&4`<@.!"`&\`;P!K
M`',`3P!N`&P`:0!N`&4`+@.`Y`"X`, `@.`"\`3 !A`'4`;@.!C`&@.`1@.!+`&4`
M>0!W`&\`<@.!D`%0`;P!P`&D`8P`@.`',`<0!L`#D`+@.!P`&\`<@.!T`&$`; `N
M`&8`,0`0````!0``H"8```!W````8 ````,``*!8`````````&-A>F%R:6P`
M``````````!(C:U715981;/P?7->-?X;;X-("D"_VA&ZS `6;VO!>$B-K5=%
?5EA%L_!]<UXU_AMO@.T@.*0+_:$;K,`!9O:\%X````````
`
end