.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


Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Sql Server
Hi All, I have face this issue. Kindly give me the solution. We have take all the backup of database and put in to single .bak file from which i select the particular bbb database and try to restore in different server.  Msg 3234, Level 16, State 2, Line 1 Logical file 'aaa_Data' is not part of database 'bbb'. Use RESTORE FILELISTONLY to list the logical file names. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.Regards RM Thirunavukkarasu MCP, MCITP, ITIL V3 | http://thiruna.blog.com

View Complete Post

More Related Resource Links

SQL Server Backup and Restore (video)

Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

Restore - Cube Analysis Services 2005

Hi, I'm from Brazil. Sorry for my English. I made a backup for my cube that has more than 2 GB, but de backup is created with only 50 mb. The backup don't showed erro message. I restored this backup without erro, but when I tryed query the cube, i receive this message: The query could not be processed: o File system error: The following file is corrupted: Physical file: \\?\C:\SQL Server\MSSQL.2\OLAP\Data\teste.59.db\"Nome_Servidor" - "Nome_Database".190.cub\Fato Inadimplencia Safra Contrato.190.det\Fato Inadimplencia Safra Contrato.167.prt\172.fact.data. Logical file . Someone can help? I realy need make this backup.Fabrício França Lima | MCP, MCTS, MCITP | Visite meu site: http://fabriciodba.spaces.live.com/ | Dicas de artigos SQL: Siga-me no twitter @fabriciodba.

SMO Backup and Restore Help

Hello Friends, I am new to SMO, Till now I have only worked with Selct,Insert/update Queries.. Now I want to Implement some backup and restore feature for my application. I looked at some documents of SMO and found it is possible using SMO. First of all I will explain my situation. My application wants to store data belongs to different companies(which is maintained with in application) in to single database server, Sql server 2008. I am planning to use Partition Scheme function and create filegroup for each company. Advantage here is, taking backup of each company will be easy. I am generating primary key for each table without taking into consideration of companies. In other words Particular table's ID 1,2 belongs to Company A, 3 Belongs to Company B and 5 belongs to Company A... But these data will be split in to Different filegroups using Company ID.(horizontal partitioning) Ok... Now the Problem.. My backup for a particular company was taken successfully. Now I want Restore function. When I am trying to restore this backup to somewhere else. Target database may or may not contain Companies installed. When Restoring Will there be any Primary key Violation? I know one solution is to generate primary key by taking into consideration Company Id. But this will cause a complete rewriting of code, as it contains lot of edit/delete queries.  I want to know, whether the

attempting to restore to a new DB and it keeps trying to save the mdf file as the original mdf file

This is using SQL Server 2005. I've had several problems and this is where I've ended up. 1. Despite the claim that this will create a new DB it doesn't.  I was getting errors about the new DB not having the specified logical file name (despite the new DB not existing).  At the time I was specifying the logical file name as it appeared in the backup. 2. if I manually create the DB I still get the error as above unless I manually change the logical file name via sql management studio.  This is meant to be an automated solution so that is not accceptable. 3. I am now giving it the logical file name of the DB that I want to restore onto (if it doesn't exist I create it), but now it's trying to save the file with the old physical file name, which is absolutely *not* what I want. My instincts tell me I need to change the logical file name in the database I'm wanting to restore onto, but I don't know how to do this via SMO.  All of the explanations I've seen are through the SQL Management Studio and that is not acceptable as this needs to be an automated solution. I have copy/pasted the code from the msdn examples verbatim changing only the dbName and the .bak file location and it has consistently failed. Here is the code in it's current incarnation. var serverName = @"myServer"; var dbName = "MIQDesignTest3"; var backupFileN

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!

What happened to the backup and restore classes in namespace Microsoft.SqlServer.Management.Smo vers

I do not see these two classes in version 10 of this namespace and I am not finding any documentation explaining what happened to them.

Error in RESTORE in LOG FILE. Anyway to exclude it?

I'm trying to install a database (on a SQL Server 2008 machine) with test data sent by a partner company in the form of a .BAK file. (Version of SQL Server they are using unknown). I'm using this script: Use Master RESTORE DATABASE XEMS FROM DISK = 'C:\temp\xemstest6-29.bak' WITH REPLACE, MOVE 'XEMS' TO 'E:\XEMS DATABASE\XEMS.MDF', MOVE 'XEMS_Log' TO 'E:\XEMS DATABASE\XEMS_Log.LDF' The Restore process churns for a while, then I get: Processed 2576 pages for database 'XEMS', file 'XEMS' on file 1. Processed 5 pages for database 'XEMS', file 'XEMS_log' on file 1. Msg 3283, Level 16, State 1, Line 2 The file "XEMS_log" failed to initialize correctly. Examine the error logs for more details. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. At this point the database is unusable - trying to do anything with it produces an error indicating the database is still in a Restore state. There is some problem with the LOG portion of the backup, which I really don't need anyway. I'd like to just NOT restore the log. Came across this article which seemed to refer to the exact problem I'm having...  http://support.microsoft.com/kb/915385/en-us They offered this suggestion: "Use the WITH NO_LOG clause during the restore process." However - in checking the RESTORE syntax.... http://msdn.microsoft.com/en-us/libr

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&

SQL 2008 Restore on a 2008 R2 Cluster

I've built a 2008 R2 Cluster running sql 2008 as a clustered application.  We do full backups with arcserve.  I'm trying to come up with a process to get the cluster back online for disaster recovery.  I can get the Windows cluster back online but when it comes to sql I get stuck.  Would I basically get the cluster back online than use the command - setup /action=rebuilddatabase /instancename=MSSQLServer /sqlsysadminaccounts=domain\username?  Than start the database in single user mode, install the arcserve sql agent and restore all the db's? When I try this I get the error element does not exist error.  Right, now I'm starting from scratch to see if I get the same result.  I just want to make sure I'm on the right track and not spinning my wheels trying something that won't work in a clustered application.   Thanks,   Matt

Backup and Restore

Hi. I am creating a vb 2010 application and I am using sql server express as my database. I need to create a backup and restore feature for the user so that the user can backup or restore the database while using the program. I have nop clue where to start. Does anyone have some code for or any suggestions?Thanks in advance.

Upgrading platform - Report Services DBs backup /restore

We are upgrading the platform for our production SQL 2005 server.  Of course, I have done this task numerous times....however this is the first time I will be dealing with Reporting Services.  I am concerned that it may not be a simple backup databases and then restore on new server, because of the encryption keys. What do I need to do ? Thanks!

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?  

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 MDF file only from bak file

Hello Friends i want to know that whether there is any provision in SQL Server 2008 to restore MDF file only from the bak file excluding the log file. i just want to know because, the bak file which i have is close to 4-5 GB, but after specifying the details while restoring the database, then it is consuming close to 80 GB as 30GB for the MDF file or 50 GB for log file. But say for once, the total hard disk is 80 GB. all the given figures are approximate except for Hard Disk size. in that case, i only want to extract the MDF file while excluding the LOG file for the database to attach. Looking for favorable replies.

Cannot Restore from backUp

Hi,     I am using SQL Server 2008. I made a backup of a database. its size is about 1000MB. I did a verify the backup and it does not give me any error. I copy the backup file to my Machine(Development Machine). I am using the exact same version of SQL server. When I try restoring from back i get the error. TITLE: Microsoft SQL Server Management Studio ------------------------------ An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ ADDITIONAL INFORMATION: The media family on device 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\dcaRms1-05Bkp.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241) When I tried doing in from code: just a Restore Verifyonly I get this error: Msg 3241, Level 16, State 7, Line 1 The media family on device 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\dcaRms1-05Bkp.bak' is incorrectly formed. SQL Server cannot process this media family. Msg 3013, Level 16, State 1, Line 1 VERIFY DATABASE is terminating abnormally. I really do not understand. It is not like I am trying to restore the backup created in 2008 to 2005 version. and I am pretty sure the backup file is not corrupt. I can restore it in the same database.
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