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

i have mdf and ldf files how to restore these 2 files in sqlserver 2000 Expand / Collapse
Author
Message
Posted Saturday, December 13, 2008 12:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 15, 2008 12:42 AM
Points: 1, Visits: 2
hi this is urgent

how to restore these files
Post #619047
Posted Saturday, December 13, 2008 2:42 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 10:05 AM
Points: 42,829, Visits: 35,961
Try attaching them. It should work.

From object explorer, right click the database folder and select Attach Database



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #619057
Posted Saturday, December 13, 2008 7:08 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 1, 2014 1:26 PM
Points: 2,242, Visits: 3,645
You can also create a dummy database with the same name as your original database, shut down sql server service and overwrite your data files with original files. Restart sql server service, It'd recover the data you had in the original database.




Pradeep Singh
Post #619075
Posted Sunday, December 14, 2008 2:24 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:03 AM
Points: 2,112, Visits: 5,427
ps (12/13/2008)
You can also create a dummy database with the same name as your original database, shut down sql server service and overwrite your data files with original files. Restart sql server service, It'd recover the data you had in the original database.


This is more of a cowboy way (e.g. not a supported way, but it works). In order for it to work you also need to create the dummy database's files with the same name as the LDF, MDF and NDF files that you have.

Personally I used it only once few years ago when I needed to attach a database that was detached while it was in suspect mode. Since the database could not be attached, I used your approach. In all other cases, when I can attach the database in the normal way, I don't see any reason to use this method.

Adi


--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #619238
Posted Sunday, December 14, 2008 5:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:47 AM
Points: 6,306, Visits: 13,605
ps (12/13/2008)
You can also create a dummy database with the same name as your original database, shut down sql server service and overwrite your data files with original files. Restart sql server service, It'd recover the data you had in the original database.

this is a last resort for damaged files. If your data files are ok then just attach as normal dont resort to this scenario


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

"Ya can't make an omelette without breaking just a few eggs"
Post #619253
Posted Sunday, December 14, 2008 6:51 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 1, 2014 1:26 PM
Points: 2,242, Visits: 3,645
Thanks for your replies Adi and Perry.
Though i consider attaching a database the simplest option to put the database back in action, i gave that option as an alternative.

Few google hits gave a 3rd option. Looks interesting but dangerous too!!
I dont suggest the initiator of this thread to try this out either.. just for informative purposes....

I havent tried it out as yet...

refer to Method Two at the following URL
http://searchsecurity.techtarget.com/tip/0,289483,sid14_gci824569,00.html






Pradeep Singh
Post #619263
Posted Sunday, December 14, 2008 12:44 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:47 AM
Points: 6,306, Visits: 13,605
ps (12/14/2008)
Though i consider attaching a database the simplest option to put the database back in action

that is the option that should used


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

"Ya can't make an omelette without breaking just a few eggs"
Post #619334
Posted Monday, December 15, 2008 7:32 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 3, 2014 12:04 PM
Points: 198, Visits: 92
Have you been successful at attaching these files to your database server? If not, what problems are you having now?

-ef


Eric Flamm, Flamm Consulting
Post #619582
Posted Tuesday, December 16, 2008 6:00 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, August 21, 2014 7:01 AM
Points: 914, Visits: 1,431
Your topic is "I have mdf and ldf files how to restore these 2 files in sqlserver 2000", but it's posted in SQL 2005 Backup section.

Are you trying to restore a SQL2005 database to SQL2000? If so, that's not possible. You would need to create an empty database with the schema and import the data.




Post #620346
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse