|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to do a restore a .BAK database - SQL 2005I did a backup of a database using SQL 2000 about a year ago. I have two
files. general.BAK and general.TRN. I created a blank database in SQL 2005 called general. I tried to restore in SQL 2005 this backup but was unsuccessful. I got an error saying, "The backup set holds a backup of a database other than the existing "general" database. Restore terminating Error 3154. I then deleted the general database in SQL 2005 then tried to run the restore again. Unsuccessful. How can I bring the data into a new database? HELP Did you see this post?
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab HTH, Stu Henry Jones wrote: Show quote > I did a backup of a database using SQL 2000 about a year ago. I have two > files. general.BAK and general.TRN. > > I created a blank database in SQL 2005 called general. > > I tried to restore in SQL 2005 this backup but was unsuccessful. I got an > error saying, "The backup set holds a backup of a database other than the > existing "general" database. Restore terminating Error 3154. > > I then deleted the general database in SQL 2005 then tried to run the > restore again. Unsuccessful. > > How can I bring the data into a new database? > > HELP Tried the following
use master; RESTORE DATABASE TimeMatters FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', STATS = 1, REPLACE GO but it failed with: Msg 3234, Level 16, State 2, Line 3 Logical file 'TimeMatters_Data' is not part of database 'TimeMatters'. Use RESTORE FILELISTONLY to list the logical file names. Msg 3013, Level 16, State 1, Line 3 RESTORE DATABASE is terminating abnormally. I am not sure if the "With MOVE" parameters are correct. Can you help out? Thanks Show quote "Stu" <stuart.ainswo***@gmail.com> wrote in message news:1154637326.409376.252510@p79g2000cwp.googlegroups.com... > Did you see this post? > > > http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab > > HTH, > Stu > > Henry Jones wrote: >> I did a backup of a database using SQL 2000 about a year ago. I have two >> files. general.BAK and general.TRN. >> >> I created a blank database in SQL 2005 called general. >> >> I tried to restore in SQL 2005 this backup but was unsuccessful. I got >> an >> error saying, "The backup set holds a backup of a database other than the >> existing "general" database. Restore terminating Error 3154. >> >> I then deleted the general database in SQL 2005 then tried to run the >> restore again. Unsuccessful. >> >> How can I bring the data into a new database? >> >> HELP > Did you RESTORE FILELISTONLY to ensure that there is a logical file
name of TimeMatters_Data? Your syntax looks correct to me. Stu Henry Jones wrote: Show quote > Tried the following > > use master; > > RESTORE DATABASE TimeMatters > > FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' > > WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL > Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', > > MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL > Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', > > STATS = 1, REPLACE > > GO > > > > but it failed with: > > > > Msg 3234, Level 16, State 2, Line 3 > > Logical file 'TimeMatters_Data' is not part of database 'TimeMatters'. Use > RESTORE FILELISTONLY to list the logical file names. > > Msg 3013, Level 16, State 1, Line 3 > > RESTORE DATABASE is terminating abnormally. > > > I am not sure if the "With MOVE" parameters are correct. Can you help out? > Thanks > > > "Stu" <stuart.ainswo***@gmail.com> wrote in message > news:1154637326.409376.252510@p79g2000cwp.googlegroups.com... > > Did you see this post? > > > > > > http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab > > > > HTH, > > Stu > > > > Henry Jones wrote: > >> I did a backup of a database using SQL 2000 about a year ago. I have two > >> files. general.BAK and general.TRN. > >> > >> I created a blank database in SQL 2005 called general. > >> > >> I tried to restore in SQL 2005 this backup but was unsuccessful. I got > >> an > >> error saying, "The backup set holds a backup of a database other than the > >> existing "general" database. Restore terminating Error 3154. > >> > >> I then deleted the general database in SQL 2005 then tried to run the > >> restore again. Unsuccessful. > >> > >> How can I bring the data into a new database? > >> > >> HELP > > I'm not sure what you mean by ensuring there is a logical file name of
TimeMatters_Data? Also, I changed the script to the following: RESTORE FILELISTONLY FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', STATS=1, REPLACE and got an error: Msg 3032, Level 16, State 2, Line 3 One or more of the options (stats, replace, stats, move) are not supported for this statement. Review the documentation for supported options. Is this something I create? If so, how? I also removed the STATS=1,REPLACE and received an error also. I checked the documentation online and I'm not sure what to do. Thanks Show quote "Stu" <stuart.ainswo***@gmail.com> wrote in message news:1154639299.508692.296770@i3g2000cwc.googlegroups.com... > Did you RESTORE FILELISTONLY to ensure that there is a logical file > name of TimeMatters_Data? Your syntax looks correct to me. > > Stu > > > Henry Jones wrote: >> Tried the following >> >> use master; >> >> RESTORE DATABASE TimeMatters >> >> FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' >> >> WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL >> Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', >> >> MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL >> Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', >> >> STATS = 1, REPLACE >> >> GO >> >> >> >> but it failed with: >> >> >> >> Msg 3234, Level 16, State 2, Line 3 >> >> Logical file 'TimeMatters_Data' is not part of database 'TimeMatters'. >> Use >> RESTORE FILELISTONLY to list the logical file names. >> >> Msg 3013, Level 16, State 1, Line 3 >> >> RESTORE DATABASE is terminating abnormally. >> >> >> I am not sure if the "With MOVE" parameters are correct. Can you help >> out? >> Thanks >> >> >> "Stu" <stuart.ainswo***@gmail.com> wrote in message >> news:1154637326.409376.252510@p79g2000cwp.googlegroups.com... >> > Did you see this post? >> > >> > >> > http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab >> > >> > HTH, >> > Stu >> > >> > Henry Jones wrote: >> >> I did a backup of a database using SQL 2000 about a year ago. I have >> >> two >> >> files. general.BAK and general.TRN. >> >> >> >> I created a blank database in SQL 2005 called general. >> >> >> >> I tried to restore in SQL 2005 this backup but was unsuccessful. I >> >> got >> >> an >> >> error saying, "The backup set holds a backup of a database other than >> >> the >> >> existing "general" database. Restore terminating Error 3154. >> >> >> >> I then deleted the general database in SQL 2005 then tried to run the >> >> restore again. Unsuccessful. >> >> >> >> How can I bring the data into a new database? >> >> >> >> HELP >> > > Try this
RESTORE FILELISTONLY FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' -- Show quoteThanks & Rate the Postings. -Ravi- "Henry Jones" wrote: > I'm not sure what you mean by ensuring there is a logical file name of > TimeMatters_Data? Also, I changed the script to the following: > > > RESTORE FILELISTONLY > > FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' > > WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL > Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', > > MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL > Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', > > STATS=1, REPLACE > > > > and got an error: > > > > Msg 3032, Level 16, State 2, Line 3 > > One or more of the options (stats, replace, stats, move) are not supported > for this statement. Review the documentation for supported options. > > > Is this something I create? If so, how? > I also removed the STATS=1,REPLACE and received an error also. I checked > the documentation online and I'm not sure what to do. > > Thanks > "Stu" <stuart.ainswo***@gmail.com> wrote in message > news:1154639299.508692.296770@i3g2000cwc.googlegroups.com... > > Did you RESTORE FILELISTONLY to ensure that there is a logical file > > name of TimeMatters_Data? Your syntax looks correct to me. > > > > Stu > > > > > > Henry Jones wrote: > >> Tried the following > >> > >> use master; > >> > >> RESTORE DATABASE TimeMatters > >> > >> FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' > >> > >> WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL > >> Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', > >> > >> MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL > >> Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', > >> > >> STATS = 1, REPLACE > >> > >> GO > >> > >> > >> > >> but it failed with: > >> > >> > >> > >> Msg 3234, Level 16, State 2, Line 3 > >> > >> Logical file 'TimeMatters_Data' is not part of database 'TimeMatters'. > >> Use > >> RESTORE FILELISTONLY to list the logical file names. > >> > >> Msg 3013, Level 16, State 1, Line 3 > >> > >> RESTORE DATABASE is terminating abnormally. > >> > >> > >> I am not sure if the "With MOVE" parameters are correct. Can you help > >> out? > >> Thanks > >> > >> > >> "Stu" <stuart.ainswo***@gmail.com> wrote in message > >> news:1154637326.409376.252510@p79g2000cwp.googlegroups.com... > >> > Did you see this post? > >> > > >> > > >> > http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab > >> > > >> > HTH, > >> > Stu > >> > > >> > Henry Jones wrote: > >> >> I did a backup of a database using SQL 2000 about a year ago. I have > >> >> two > >> >> files. general.BAK and general.TRN. > >> >> > >> >> I created a blank database in SQL 2005 called general. > >> >> > >> >> I tried to restore in SQL 2005 this backup but was unsuccessful. I > >> >> got > >> >> an > >> >> error saying, "The backup set holds a backup of a database other than > >> >> the > >> >> existing "general" database. Restore terminating Error 3154. > >> >> > >> >> I then deleted the general database in SQL 2005 then tried to run the > >> >> restore again. Unsuccessful. > >> >> > >> >> How can I bring the data into a new database? > >> >> > >> >> HELP > >> > > > > > > It gave me two records returned. Now what do I do with the results. There
is a logical name and physical name. Thanks Show quote "Ravi" <ravishank***@hotmail.com> wrote in message news:94007858-5425-4C3C-9B15-C3A20892BA69@microsoft.com... > Try this > RESTORE FILELISTONLY FROM DISK = > 'D:\temp\TimeMatters5_db_200503300200.bak' > > -- > Thanks & Rate the Postings. > -Ravi- > > > "Henry Jones" wrote: > >> I'm not sure what you mean by ensuring there is a logical file name of >> TimeMatters_Data? Also, I changed the script to the following: >> >> >> RESTORE FILELISTONLY >> >> FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' >> >> WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL >> Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', >> >> MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL >> Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', >> >> STATS=1, REPLACE >> >> >> >> and got an error: >> >> >> >> Msg 3032, Level 16, State 2, Line 3 >> >> One or more of the options (stats, replace, stats, move) are not >> supported >> for this statement. Review the documentation for supported options. >> >> >> Is this something I create? If so, how? >> I also removed the STATS=1,REPLACE and received an error also. I checked >> the documentation online and I'm not sure what to do. >> >> Thanks >> "Stu" <stuart.ainswo***@gmail.com> wrote in message >> news:1154639299.508692.296770@i3g2000cwc.googlegroups.com... >> > Did you RESTORE FILELISTONLY to ensure that there is a logical file >> > name of TimeMatters_Data? Your syntax looks correct to me. >> > >> > Stu >> > >> > >> > Henry Jones wrote: >> >> Tried the following >> >> >> >> use master; >> >> >> >> RESTORE DATABASE TimeMatters >> >> >> >> FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' >> >> >> >> WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL >> >> Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', >> >> >> >> MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL >> >> Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', >> >> >> >> STATS = 1, REPLACE >> >> >> >> GO >> >> >> >> >> >> >> >> but it failed with: >> >> >> >> >> >> >> >> Msg 3234, Level 16, State 2, Line 3 >> >> >> >> Logical file 'TimeMatters_Data' is not part of database 'TimeMatters'. >> >> Use >> >> RESTORE FILELISTONLY to list the logical file names. >> >> >> >> Msg 3013, Level 16, State 1, Line 3 >> >> >> >> RESTORE DATABASE is terminating abnormally. >> >> >> >> >> >> I am not sure if the "With MOVE" parameters are correct. Can you help >> >> out? >> >> Thanks >> >> >> >> >> >> "Stu" <stuart.ainswo***@gmail.com> wrote in message >> >> news:1154637326.409376.252510@p79g2000cwp.googlegroups.com... >> >> > Did you see this post? >> >> > >> >> > >> >> > http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab >> >> > >> >> > HTH, >> >> > Stu >> >> > >> >> > Henry Jones wrote: >> >> >> I did a backup of a database using SQL 2000 about a year ago. I >> >> >> have >> >> >> two >> >> >> files. general.BAK and general.TRN. >> >> >> >> >> >> I created a blank database in SQL 2005 called general. >> >> >> >> >> >> I tried to restore in SQL 2005 this backup but was unsuccessful. I >> >> >> got >> >> >> an >> >> >> error saying, "The backup set holds a backup of a database other >> >> >> than >> >> >> the >> >> >> existing "general" database. Restore terminating Error 3154. >> >> >> >> >> >> I then deleted the general database in SQL 2005 then tried to run >> >> >> the >> >> >> restore again. Unsuccessful. >> >> >> >> >> >> How can I bring the data into a new database? >> >> >> >> >> >> HELP >> >> > >> > >> >> >> Make sure the logical name matched with the logical name in MOVE option of
RESTORE database. -- Show quoteThanks & Rate the Postings. -Ravi- "Henry Jones" wrote: > It gave me two records returned. Now what do I do with the results. There > is a logical name and physical name. > > Thanks > "Ravi" <ravishank***@hotmail.com> wrote in message > news:94007858-5425-4C3C-9B15-C3A20892BA69@microsoft.com... > > Try this > > RESTORE FILELISTONLY FROM DISK = > > 'D:\temp\TimeMatters5_db_200503300200.bak' > > > > -- > > Thanks & Rate the Postings. > > -Ravi- > > > > > > "Henry Jones" wrote: > > > >> I'm not sure what you mean by ensuring there is a logical file name of > >> TimeMatters_Data? Also, I changed the script to the following: > >> > >> > >> RESTORE FILELISTONLY > >> > >> FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' > >> > >> WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL > >> Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', > >> > >> MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL > >> Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', > >> > >> STATS=1, REPLACE > >> > >> > >> > >> and got an error: > >> > >> > >> > >> Msg 3032, Level 16, State 2, Line 3 > >> > >> One or more of the options (stats, replace, stats, move) are not > >> supported > >> for this statement. Review the documentation for supported options. > >> > >> > >> Is this something I create? If so, how? > >> I also removed the STATS=1,REPLACE and received an error also. I checked > >> the documentation online and I'm not sure what to do. > >> > >> Thanks > >> "Stu" <stuart.ainswo***@gmail.com> wrote in message > >> news:1154639299.508692.296770@i3g2000cwc.googlegroups.com... > >> > Did you RESTORE FILELISTONLY to ensure that there is a logical file > >> > name of TimeMatters_Data? Your syntax looks correct to me. > >> > > >> > Stu > >> > > >> > > >> > Henry Jones wrote: > >> >> Tried the following > >> >> > >> >> use master; > >> >> > >> >> RESTORE DATABASE TimeMatters > >> >> > >> >> FROM DISK = 'D:\temp\TimeMatters5_db_200503300200.bak' > >> >> > >> >> WITH MOVE 'TimeMatters_Data' TO 'C:\Program Files\Microsoft SQL > >> >> Server\MSSQL.1\MSSQL\Data\TimeMatters.mdf', > >> >> > >> >> MOVE 'TimeMatters_log' TO 'C:\Program Files\Microsoft SQL > >> >> Server\MSSQL.1\MSSQL\Data\TimeMatters_Log.ldf', > >> >> > >> >> STATS = 1, REPLACE > >> >> > >> >> GO > >> >> > >> >> > >> >> > >> >> but it failed with: > >> >> > >> >> > >> >> > >> >> Msg 3234, Level 16, State 2, Line 3 > >> >> > >> >> Logical file 'TimeMatters_Data' is not part of database 'TimeMatters'. > >> >> Use > >> >> RESTORE FILELISTONLY to list the logical file names. > >> >> > >> >> Msg 3013, Level 16, State 1, Line 3 > >> >> > >> >> RESTORE DATABASE is terminating abnormally. > >> >> > >> >> > >> >> I am not sure if the "With MOVE" parameters are correct. Can you help > >> >> out? > >> >> Thanks > >> >> > >> >> > >> >> "Stu" <stuart.ainswo***@gmail.com> wrote in message > >> >> news:1154637326.409376.252510@p79g2000cwp.googlegroups.com... > >> >> > Did you see this post? > >> >> > > >> >> > > >> >> > http://groups.google.com/group/microsoft.public.sqlserver.server/browse_frm/thread/a2b13153c3fc7bd8/d4fbe7d8207836ab%23d4fbe7d8207836ab > >> >> > > >> >> > HTH, > >> >> > Stu > >> >> > > >> >> > Henry Jones wrote: > >> >> >> I did a backup of a database using SQL 2000 about a year ago. I > >> >> >> have > >> >> >> two > >> >> >> files. general.BAK and general.TRN. > >> >> >> > >> >> >> I created a blank database in SQL 2005 called general. > >> >> >> > >> >> >> I tried to restore in SQL 2005 this backup but was unsuccessful. I > >> >> >> got > >> >> >> an > >> >> >> error saying, "The backup set holds a backup of a database other > >> >> >> than > >> >> >> the > >> >> >> existing "general" database. Restore terminating Error 3154. > >> >> >> > >> >> >> I then deleted the general database in SQL 2005 then tried to run > >> >> >> the > >> >> >> restore again. Unsuccessful. > >> >> >> > >> >> >> How can I bring the data into a new database? > >> >> >> > >> >> >> HELP > >> >> > > >> > > >> > >> > >> > > > |
|||||||||||||||||||||||