Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database restore issue Expand / Collapse
Author
Message
Posted Sunday, December 30, 2012 1:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24, Visits: 51
Hi,

I am facing an error while restoring adventure works database to my sql server 2008.

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 'D:\ssis_works\New folder\SQL2008.AdventureWorksLT2008_Only_Database\AdventureWorksLT2008_Data.mdf' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Plz help me to resolve this issue...
Post #1401232
Posted Sunday, December 30, 2012 1:33 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:08 PM
Points: 20,905, Visits: 32,960
You are trying to restore the mdf file. You need to attach the file to your server such that it recreates the ldf file. Not sure how you do that as I haven't had to yet.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1401233
Posted Sunday, December 30, 2012 1:42 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24, Visits: 51
I have tried to with ldf file also. I got the same issue.

Below the steps i followed to restore the database from disc.

step 1 : Logging sql server
step 2: Right click on Database. restore database
step 3 : selected the .mdf file
step 4: click ok

after clicking the ok button i got the error msg.
Post #1401234
Posted Sunday, December 30, 2012 1:43 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:08 PM
Points: 20,905, Visits: 32,960
sanandh87 (12/30/2012)
I have tried to with ldf file also. I got the same issue.

Below the steps i followed to restore the database from disc.

step 1 : Logging sql server
step 2: Right click on Database. restore database
step 3 : selected the .mdf file
step 4: click ok

after clicking the ok button i got the error msg.


You do not restore the mdf file, you need to attach it. The mdf file is NOT a backup file.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1401235
Posted Sunday, December 30, 2012 1:46 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24, Visits: 51
Thanks for info. I tried what you instruct but i got an error.

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'ANANDH-HP'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617.0+((KJ_RTM_GDR).110422-1901+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Unable to open the physical file "D:\ssis_works\New folder\SQL2008.AdventureWorksLT2008_Only_Database\AdventureWorksLT2008_Data.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Plz help me on this...
Post #1401236
Posted Sunday, December 30, 2012 1:53 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:08 PM
Points: 20,905, Visits: 32,960
Looks like a permissions issue on the mdf file.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1401237
Posted Sunday, December 30, 2012 1:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24, Visits: 51
Please help me to resolve this issue..
Post #1401238
Posted Sunday, December 30, 2012 1:58 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:08 PM
Points: 20,905, Visits: 32,960
sanandh87 (12/30/2012)
Please help me to resolve this issue..


It is a permissions issue. You will need to check the permissions of the file on your system and resolve it such that SQL Server can access the file.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1401239
Posted Monday, December 31, 2012 12:23 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 25, 2014 8:04 PM
Points: 7,141, Visits: 12,768
Remember that D:\ is from the perspective of the server. If you have downloaded the AdventureWorks mdf file to your own D:\ drive and are trying to attach it to a shared instance that is not hosted on your local machine, i.e. that does not have access to the file using that same path to your local D:\ drive, then you can see problems like this too.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1401474
Posted Thursday, January 3, 2013 2:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 7, 2013 5:14 AM
Points: 4, Visits: 2
Checkout these references would be help you:

http://msdn.microsoft.com/en-us/library/ms177429.aspx

http://www.techrepublic.com/blog/window-on-windows/how-do-i-restore-a-sql-server-database-to-a-new-server/454

http://www.howtogeek.com/50354/restoring-a-sql-database-backup-using-sql-server-management-studio/

If the above solution did not work try this free trial version of SQL Database recovery Software.

http://www.repairsqlserver.net


Thanks
Post #1402261
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse