SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


i have mdf and ldf files how to restore these 2 files in sqlserver 2000


i have mdf and ldf files how to restore these 2 files in sqlserver 2000

Author
Message
ramawithuever
ramawithuever
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 2
hi this is urgent

how to restore these files
GilaMonster
GilaMonster
SSC Guru
SSC Guru (555K reputation)SSC Guru (555K reputation)SSC Guru (555K reputation)SSC Guru (555K reputation)SSC Guru (555K reputation)SSC Guru (555K reputation)SSC Guru (555K reputation)SSC Guru (555K reputation)

Group: General Forum Members
Points: 555209 Visits: 47757
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, MVP, M.Sc (Comp Sci)
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


ps.
ps.
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15594 Visits: 3674
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
Adi Cohn
Adi Cohn
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19606 Visits: 6653
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/
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)

Group: General Forum Members
Points: 138158 Visits: 18227
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" ;-)
ps.
ps.
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15594 Visits: 3674
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
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)SSC Guru (138K reputation)

Group: General Forum Members
Points: 138158 Visits: 18227
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" ;-)
Eric M Flamm
Eric M Flamm
SSC-Addicted
SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)

Group: General Forum Members
Points: 452 Visits: 106
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

Steve-3_5_7_9
Steve-3_5_7_9
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6468 Visits: 1613
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.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search