Solved

SQL EXPRESS and SQL Server backup and restore issue smo

Posted on 2007-11-22
5
1,670 Views
Last Modified: 2008-02-01
Hello Tech Gurus,

I took a backup of my database in SQL EXPRESS( using the backup option when when right click on the database)  and now i trying to restore this database in proper SQL SERVER( restore option we get when you right click on the database folder) and it won't. It says " Restore failed for "SERVER_NAME" Microsoft.Sql.Server.smo"
Restore failed for Server 'PURPLESERV'.  (Microsoft.SqlServer.Smo)

Following is the detailed error message

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'StandardTimeSQL' database. (Microsoft.SqlServer.Smo)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
   at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

===================================

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'StandardTimeSQL' database. (Microsoft.SqlServer.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
   at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)


Thanking you in Advance
Regards

0
Comment
Question by:Danbrasco
  • 3
  • 2
5 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
ID: 20333948
include the WITH REPLACE command
0
 
LVL 25

Assisted Solution

by:imitchie
imitchie earned 500 total points
ID: 20333955
or from the gui, go to the 2nd tab and tick overwrite
0
 

Author Comment

by:Danbrasco
ID: 20334171
I think i have select this radio button option and manage to restore but it seems to be empty. How can i check if it has been restored.
0
 

Author Comment

by:Danbrasco
ID: 20334229
After restoring the database into SQL server, I tried creating the  same users again( that use to be in the SQL EXPRESS ) but it says that user already exsit but i don't have users listed in the login list.
Please see the following error

Server Name: SEVER_NAME
Error Number: 15023
Severity: 16
State: 1
Line Number: 1

User, group, or role 'MY_NAME' already exists in the current database. (.Net SqlClient Data Provider)
0
 
LVL 25

Assisted Solution

by:imitchie
imitchie earned 500 total points
ID: 20336046
try

sp_dropuser username

before adding again
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now