Ms Sql Server Error 3154
Contents |
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company
The Backup Set Holds A Backup Of A Database Other Than The Existing Database Sql Server 2008 R2
Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags error 3154 in sql server 2014 Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve cannot be overwritten. it is being used by database their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up
With Replace
and rise to the top Error 3154 while restoring a backup using WITH REPLACE up vote 10 down vote favorite I have SQL 2012 with SP1 installed on my computer. I made a backup of a database test.bak. I have a database with the name test2 which is the same database, but the data changed. I want to restore test.bak over test2 database. I am always getting the error: Error 3154: The backup set holds
Directory Lookup For The File
a backup of a database other than the existing database. I tried: I right-cliked on test2 -> Restore database -> From device I chose test.bak and checked With Replace but I get the error. Then I tried to right-click on test2 -> Restore file and filegroups I chose test.bak and checked With Replace but I get the error. I can delete my old database and then restore my backup with the right name, but when I was using SQL 2008, I had no problem restoring over an existing database. It seems that since I use SQL2012, I get this error a lot! sql-server sql sql-server-2012 backup restore share|improve this question edited Jun 20 '13 at 15:51 Aaron Bertrand♦ 114k14196337 asked Jun 20 '13 at 15:21 Danielle Paquette-Harvey 3711310 migrated from stackoverflow.com Jun 20 '13 at 15:30 This question came from our site for professional and enthusiast programmers. add a comment| 6 Answers 6 active oldest votes up vote 9 down vote accepted You should use WITH REPLACE and in general avoid using the point-and-click thingies in Management Studio - they're inflexible and often have bugs. This worked for me: USE [master]; GO CREATE DATABASE test; GO CREATE DATABASE test2; GO BACKUP DATABASE test TO DISK = 'c:\temp\test.bak' WITH INIT, COMPRESSION; GO RESTORE DATABASE test2 FROM DISK = 'c:\temp\test.bak' WITH REPLACE, MOVE 'test' TO 'c:\temp\test2.mdf',
SERVER - FIX : Error 3154: The backup set holds a backup of a database other than the existing database - SSMS November 23, 2013Pinal DaveSQL, SQL Server, system data sqlclient sqlerror the backup set holds a backup of a database other than the existing SQL Tips and Tricks21 commentsThis is a follow up of the
Logical File Is Not Part Of Database Use Restore Filelistonly To List The Logical File Names
blog post I have posted on error 3154 few years ago. I have received quite a file cannot be restored to use with move to identify a valid location for the file few emails that how we can fix the same error with the help of SQL Server Management Studio. In this blog post, I will explain how http://dba.stackexchange.com/questions/44967/error-3154-while-restoring-a-backup-using-with-replace we can do the same with SSMS. Here is the error code:Error 3154: The backup set holds a backup of a database other than the existing database.You can fix that with the help of T-SQL with the following command. RESTORE DATABASE AdventureWorks
FROM DISK = 'C:\BackupAdventureworks.bak'
WITH http://blog.sqlauthority.com/2013/11/23/sql-server-fix-error-3154-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing-database-ssms/ REPLACEIf you want to do the same with SSMS, you can follow the steps here: Step 1: Create a database with your preferred name. (In our case AdventureWorks)Step 2: Write click on the database and click on Tasks >> Restore >> Database…Step 3: On the restore screen go to third selection of Options. Now select the checkbox "Overwrite the existing database (WITH REPLACE)"Step 4: Click OK. It should successfully restore the database.Note: When you restore a database WITH REPLACE it will overwrite the old database.Relevant Blog Post:FIX : Error 3154: The backup set holds a backup of a database other than the existing databaseReference : Pinal Dave (http://blog.SQLAuthority.com) Tags: SQL Backup and Restore, SQL Data Storage, SQL Error Messages, SQL Scripts57Related Articles SQL SERVER - List Schema Name and Table Name for Database June 17, 2009Pinal Dave SQL SERVER - Orphaned MS DTC Transaction Information May 14, 2008Pinal Dave SQL SERVER - Beginning of SQL S
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Error 3154: The backup https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e9e575f6-f034-4813-82c0-3b399118b72c/error-3154-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing-xx-database?forum=sqltools set holds a backup of a database other than the existing https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d315d8f4-d7e2-4197-9cbb-4cbe086af33e/database-restore-error-3154-and?forum=sqldisasterrecovery 'xx' database. SQL Server > SQL Server Tools Question 0 Sign in to vote HELP! This is happening with a restore to SS 2005 from a SS2000 backup. This article says to use the 'WITH REPLACE' clause. The SS2005 management studio does not seem to sql server allow this via the GUI. http://msdn2.microsoft.com/en-us/library/aa238217(sql.80).aspx Saturday, February 03, 2007 4:56 PM Reply | Quote Answers 9 Sign in to vote Did you use the overwrite flag in the GUI if the database already existed ?HTH, Jens K. Suessmeyer.---http://www.sqlserver2005.de--- Sunday, February 04, 2007 8:08 PM Reply | Quote Moderator All replies 9 Sign the backup set in to vote Did you use the overwrite flag in the GUI if the database already existed ?HTH, Jens K. Suessmeyer.---http://www.sqlserver2005.de--- Sunday, February 04, 2007 8:08 PM Reply | Quote Moderator 0 Sign in to vote True and you can use the Query Editior to restore the same using RESTORE DATABASE .... WITH REPLACE, as referred in BOL it is easy. Monday, February 05, 2007 4:48 PM Reply | Quote Moderator 0 Sign in to vote Hi all, I am facing this problem, when i try to restore a file in a database. Scenario Database ABC with 1 Filegroup and 8 Files and 1 Log. Now i want to restore the Database ABC to another Server as ABC. due to space constraint i have thought of file backup and Restore. So i backuped up the first file, when i want to restore, It say the error. I have given overwrite existing media and i tried it with media as well a
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Database Restore, Error 3154 and SQL Server > SQL Server High Availability and Disaster Recovery Question 0 Sign in to vote Hi all, I am trying to restore and SQL 2000 database into a new SQL 2005 database. I performed by SQL 2000 backup and created a blank database FERS_Production in SQL 2005. FERS_Production was the original name of the database in the SQL 2000 instance. I have tried giving the new database the same name as the original and a different name to the original database (Below is the scripted T-SQL that I get from the DB Admin tool RESTORE DATABASE [Fers_Production] FILE = N'FERS_Production_dat', FILE = N'FERS_Production_log' FROM DISK = N'D:\Microsoft SQL Server (2000)\MSSQL\Backup\Fers_Production\Fers_Production_db_200607270206.BAK' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10GO
When I run this I get the following error. Msg 3154, Level 16, State 4, Line 1The backup set holds a backup of a database other than the existing 'Fers_Production' database.Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally. Other searches I have performed trying to fix this problem have said to use the REPLACE clause with theRESTORE DATABASE command, butas you can see I am doing that. Also I no longer have SQL 2000 installed so I cannot try to do a DTS copy which was another suggestion I came across. Any help is much appriciated, many thanks Derek Monday, July 31, 2006 1:36 AM Reply | Quote Answers 0 Sign in to vote The restore process cannot restore the database from the backup file because there is already a database called Fers_Production present on your SQL 2005 server. Try deleting the Fers_Production database you created and then do the restore of the backup file. Monday, July 31, 2006 5:24