.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

restore database failed

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Sql Server
Hi everyone.   I had installed sql server 2008 on my local machine to develop a project.After i had done more than a half of that i had some problems with my computer so i had to format it.I backed up the database and i copied the file nomedatabase.bak. After formating and reinstalling the slq server 2008 r2 develope edition i would like to restore the database i had before but when i chose to restore the database  (i created a new database with the same name and than right click on the database -> tasks -> restore ->database  ) i get the following error.   TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore failed for Server 'ALDUXO-PC\ALDUXO'. (Microsoft.SqlServer.SmoExtended) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'aldux_test' database. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&LinkI

View Complete Post

More Related Resource Links



i am restoring database and my restore terminate and failed with below error.

Processed 127940376 pages for database 'TST', file 'TSTDATA1' on file 13.
Processed 4416000 pages for database 'TST', file 'TSTDATA2' on file 13.
Processed 8421368 pages for database 'TST', file 'TSTDATA3' on file 13.
Processed 1156 pages for database 'TST', file 'TSTLOG1' on file 13.
Msg 3229, Level 16, State 2, Line 1
Request for device '\\.\Tape0' timed out.
Msg 3213, Level 16, State 1, Line 1
Unable to unload one or more tapes. See the error log for details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

i try with different backup media but both the time receiving same error message.



Restore database backup with Copy_Only option failed ?


When we failed to restore a backup from a BAK file for SQL Server 2008.


Then we find that the backup is created by using BACKUP xxxx COPY_ONLY parameter.  When we attempt  to restore from Management Studio (with the database changed to single user mode), we get the error message "There is NOTHING in the "Select the backup sets to restore".


We would like to seek your advice on

1) Whether we can restore the database from Management Studio GUI ?

2) If not, can you suggest a SQL Script for the backup ?


Thanking you in anticipation.

Restore of database backup done by script failed



In my C++ application (with MFC) developed in Visual Studio 2010 the user has an option to take a backup of the current database. This is done by executing a Stored Procedure which takes the database name and backup file name as parameters:

CREATE PROCEDURE sp2_backup_database @DATABASE nvarchar(100), @FILENAME nvarchar(260)
  Exec ('Backup Database [' + @DATABASE + '] TO  DISK = ''' + @FILENAME + '''
      '-Full Database Backup'', SKIP, NOREWIND, NOUNLOAD, STATS = 10')
   Return @@ERROR

All this works fine, the backup is done properly by the SP.
What is bothering me is that when trying to make a restore of the database from the backup file the restore fails with a message like (freely translated from Swedish):

"Restore failed for [the SQL Server]. (Microsoft.SqlServer.SmoExtended)
Additional information:
System.Data.SqlClien.SqlError: RESTORE can not process the database [Database-name] since it's in use by this process. It's recommended to use master database during this task."

The only way I can

Failed to update database "Hist_OHLC_ASnapshot" because the database is read-only.

Hi there, I've got this ExecutionfailureException using the subroutine below. It's been suggested by Alok.   public void CreateSnapshotAlok ( string SourceDatabaseName )         {             ProvideSecurity.provideSecurity ( );             DoServer.GetSrvConnOrSwitch ( "master" );             /* This is to ensure that a database with same name does not exist which is not needed if one chooses unique name for snapshot each time.*/             if ( Globals.srv.Databases[ SourceDatabaseName + "_Snapshot" ] != null )             {                 Globals.srv.Databases[ SourceDatabaseName + "_Snapshot" ].Drop ( );             }             Database database = Globals.srv.Databases[ SourceDatabaseName ];             Database snapshot = new Database ( Globals.srv, SourceDatabaseName + "Snaps

SQL2008 - Cannot Restore a new database from a full backup of a different one, database in use

I am trying to restore a brand new database from a copy of another one and am encountering an error message stating: System.Data.SqlClient.SqlError: The file <Backup source database file location> cannot be overwritten.  It is being used by database <Backup Source Database>. (Microsoft.SqlServer.Smo) I am running the Restore procedure with the REPLACE option and am wondering why it is stating that the source database is the database in use when I am trying to restore and overwrite a completely different database. This issue happens when running the replace both in C# using SMO and when manually restoring with SqlServer Management Studio Interesting note is, the original source database is created / deployed using a database project within VisualStudios 2010 and then deployed to SqlServer through VisualStudios. Any thoughts on why this is happening? Thanks in advance for any help!

Single-page restore/recover in an online database

I am working with SQL Server 2008 64-bit (10.0.2531) on Windows Server Datacenter 2008 SP2 (64-bit). The problems I am having almost certainly stem from my lack of understanding of how SQL Server's transaction log is handled during recoveries. I am using this document as a rough guide. Here' what I am doing: 1. I intentionally corrupt a single data page in a normal table, so that I can practice single-page recovery. 2. I attempt to read the corrupt block in SQL. As expected I receive an error. 1> select top 10 firstname from ds2.dbo.customers 2> go Msg 824, Level 24, State 2, Server IP-0AF647E0, Line 1 SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 4:896; actual 3:0). It occurred during a read of page (4:896) in database ID 5 at offset 0x00000000700000 in file 'C:\sql\dbfiles\cust1.ndf'. Additional messages in the SQL Server error log or system event log may provide more detail. 3. I take a log tail backup before I do anything to try to fix the corruption: 1> backup log ds2 to disk = 'c:\sqlbackup\ds2.bak' with norecovery 2> go Processed 5 pages for database 'ds2', file 'ds_log' on file 1. BACKUP LOG successfully processed 5 pages in 0.041 seconds (0.857 MB/sec). 4. I  restore the corrupt page from backup: 1> restore database ds2 page='4:896' 2> from disk='c:\sqlbackup\ds2.bak' 3> with norecovery 4&

attach sample database failed in sql 2008 express RTM

I'm having a trouble attaching sample database northwnd database,screen show me the error attach database failed for server 'computername\sqlexpress' additional inforamtion: the database 'northwind' cannot be opended because it is version 661.this server supports version 655 and earlier.a downgrade path is not supported.could not open new database 'northwind',create database is aborted,()microsoft sql server,error:948) my os is xp sp3,sql express version is  Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)   Jul  9 2008 14:43:34   Copyright (c) 1988-2008 Microsoft Corporation  Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)  I 'm sure database 'northwind' is ok.I can used database 'northwind' on my other computer.the other computer install express 2008R2 .    install RTM computer  ,database route is C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS,not C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. actually I 'm install sample database in sql express RTM on my computer.I just wonder why attach good database failed,how to solved this issue. http://sqlserversamples.codeplex.com/releases/view/45923 this link is avialable   thanks for you help

Cannot open database "ReportServer$SQLEXPRESS" requested by the login. The login failed. (App Log Ev

I have SQL'08r2x64 freshly installed on a WS'03r2x64sp2 box and WS is also a DC (sorry).  Previously, there was a SQL'05sp3 installation on this box and it worked splendito.  I used the SQL'05 for some minor devel and to host a Backup Exec 11D db/installation; it all was splendito.   Then, i removed SQL'05&BE11D to prepare for an upgrade of this arrangement.  Next, i installed said SQL'08 to be the foundation for a planned Backup Exec 12.5 install.  To date, I can't get to a clean install of SQL'08 and thus have not progressed to installing BE12.5.  I now have this painfully annoying situation (as i've been beating on it for 2 days) where a series of errors occur during boot: 1st: srmSvc; Event ID 12317; File Server Resource Manager failed to enumerate share paths or DFS paths.  Mappings from local file paths to share and DFS paths may be incomplete or temporarily unavailable.  FSRM will retry the operation at a later time. 2nd & 3rd (occurs twice): MsSQL$buExpressSQL; Event ID 18456; Login failed for user 'BOWMAN\ExecSQL'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>] 4th: Report Server Windows; Event ID 107; Report Server Windows Service (SQLEXPRESS) cannot connect to the report server database. I couldn't find anything to sink my teeth into for the 12317 error; i

How to restore a database to the d drive

I have a 2008 database I need to restore, but my C drive is almost full.  How do I telll it to restore my database to the D drive?  

Crystal Report Export - Database Logon Failed Error -

 Below is my code in VB.Net.  I am using PUSH method to populate the DataSet.  I use Crystal Report and VS 2003.   I am trying to export a crystal report to a PDF and I am getting a database log on error.   Why would it give me this error since the report is getting its data from the DataSet.  Please help!!!  ---------------------------------------------- Try Dim oStream As New MemoryStream Me.crpt_numIssues.ExportToStream(ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Response.BinaryWrite(oStream.ToArray()) Response.End() Catch ex As Exception Dim mgsText As String mgsText = "ERROR: An error occured. <br>" + ex.ToString Me.ShowErrorPanel(mgsText) End Try ------------------------------ The error is: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqCo

SharePoint Version 2.0 (WSS 2.0 SP3) Content Database restore to new farm

Is it possible to use an SQL backup from a sharepoint Version 2 SP3 database to restore the content on a new server farm and attach to a new web applicaiton. NOTE: This is WSS 2.0. In WSS 3.0 this is a very simple task, but it is not the same in WSS 2.0 (the add content database option CANNOT be used to attach to an existing content database like it does in WSS 3.0). The options I have found appear to say you need the configuration database from the old server then it can be done. I am migrating from an outsourced deployment, so I do not have access to that. Plan B is to do a sharepoint STSADM backup. THis seems to be a more likey way to do it.

Can't restore database backup file in my database ? using sql server 2005. please help

VERY IMPORTANT i am trying to restore database.bak in sql server 2005 (i know the database.bak was also generated in sql 2005 server) i am trying to restore back up database .bak into the new database i just created in sql server 2005 i have saved my database .bak into c drive and when i select database .bak "From Device", it doesn't get populated in the list below and i see nothing and it keeps on prompting a message "You must select a restore source" Here's the screen shot:   PLEASE HELP..it's really important (i tried restoring database in sql server 2008 and it was sucessful but i am facing this problem in sql server 2005 only)  

How to restore database from .bak file /

I have a .bak database file and i want to restore it to a new database so that i can get the data inside the .bak fileI am using SSMS 2008 Expresswhat i did :I created a database with the same name as of my .bak file (in my case "RM")now after creating a new database > righclick  on database > tasks > restoreSelected FROM : RM ( empty database that i just created)Selected TO : RM.bak (my backup file)when i press "Ok"i get this error:

Restore 2005 database on 2008 R2 Trial

I've downloaded SQL Server 2008 R2 Trial and installed it on Windows Server 2008 trial running under Virtual PC on XP. I've made backups of databases on my SQL Server 2005 and tried to restore them using a) the wizard - results in a messagebox saying "Specified cast is not valid" and no backup sets are available in the Restore Database window. b) using T-SQL - results in Msg 3183, Level 16, State 2, Line 1 RESTORE detected an error on page (0:0) in database "dp" as read from the backup set. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. Using the wizard and RESTORE on 2005 for the same database backup works fine. c) Detach on 2005 and Attach on 2008 results in: SQL Server detected a logical consistency-based I/O error: incorrect pageid... Detach and Attach worked fine on 2005 and DBCC CHECKDB revealed no errors. Thanks for any info...

Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)

Hello,This is the first time I am using this forum. I am stuck and need some help. I received this error message both on SQL 2005 and 2008. I am currently using SQL 2008 DEV for testing purposes and I am experiencing this error message when trying to connect to Database Engine Tuning Advisor. I am using the SA account so I should not have any security issues. Also this is a fresh install of SQL 2008 DEV on a fresh install of Windows XP Pro with all SP. Can some please help.Error:"Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient)"=================================== Failed to open a new connection. =================================== Failed to initialize MSDB database for tuning (exit code: -1073741819). (DTAClient) ------------------------------Program Location:    at Microsoft.SqlServer.Management.DTA.Client.TuningServer.InitializeTuningParametersDatabase()   at Microsoft.SqlServer.Management.DTA.Client.TuningServer.InitializeConnection()   at Microsoft.SqlServer.Management.DTA.Client.TuningServer.Connect()   at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.AddServerInternal(SqlConnectionInfo connectionInfo, SqlConnection connection)   at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.AddServer(SqlConnectionInfo connectionInfo, SqlConnection connection)   at Microsoft.SqlServer.Management.DTA.Shell.SessionMonitor.On

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential cau

Attempting to upgrade from SQL 2005 EE to SQL 2008 EE on Vmware ESX 3.5 virtual server. below is info from Detail.txt related to successful install with failures... 2010-09-02 13:50:46 Slp: Sco: Attempting to check if file 'D:\Data\MSSQL.1\MSSQL\LOG\ERRORLOG' exists 2010-09-02 13:50:46 Slp: Sco: Returning security descriptor O:BAG:SYD:AI(A;ID;FA;;;S-1-5-21-3788118842-658835432-3441893140-1006)(A;ID;FA;;;S-1-5-21-3788118842-658835432-3441893140-1007)(A;ID;FA;;;BA)(A;ID;FA;;;SY)S:AI(AU;IDFA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD) 2010-09-02 13:50:46 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. 2010-09-02 13:50:46 Slp: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes. 2010-09-02 13:50:46 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. 2010-09-02 13:50:46 Slp: Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineConfigException: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes. 2010-09-02 13:50:46 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql) 2010-09-02 13:50:46 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(St

how to restore msdb database on sql 2008 from sql 2005 backup?

Currently, I am unable to do it. It gives me the error than I cannot be restored because it was created by a different version of the server. What is the work-around? I hate scripting all my maintenance plans and alerts, there are tonns of themJulieShop
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend