Solved

SQL database recovery

Posted on 2011-03-07
5
244 Views
Last Modified: 2012-05-11
I have an application that writes data into a SQL database. Last week, a laptop crashed and had to be rebuilt. I was able to recover the .mdf and .ldf files but the application dooesn't have any allowance for an import.

So I have a database that I can't get data out of.

What options do I have? It's runs on SQL 2005 and I have the managment studio installed. But I'm not a SQL expert.

I might be fine with getting the data into an Access database or even written to an XML file.

If there's a way to inport the data into the new application database that would be the best solution to this. I should also note that there doesn't seem to be any sa password setup during the install, the only username/password requested is during the setup of the application itself.

Also, SQL is installed during the application install and isn't a preexisting install...
0
Comment
Question by:underIce
  • 4
5 Comments
 
LVL 13

Accepted Solution

by:
Wizilling earned 500 total points
Comment Utility
you need to attach the mdf and ldf files in management studio.

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

http://www.youtube.com/watch?v=OLuciwUZCv0
0
 

Author Comment

by:underIce
Comment Utility
When I try that I get this error:
TITLE: Microsoft SQL Server Management Studio Express
Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
The server principal "BH-PC\BH" is not able to access the database "model" under the current security context. (Microsoft SQL Server, Error: 916)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4035&EvtSrc=MSSQLServer&EvtID=916&LinkId=20476

This error happens right after I select the add button in the Attach Database dialog box...
0
 

Author Comment

by:underIce
Comment Utility
Wait, hold up....had to run as administrator.
0
 

Author Comment

by:underIce
Comment Utility
Win. That's how much I'm not a SQL guy...easy as it gets, Thanks!
0
 

Author Closing Comment

by:underIce
Comment Utility
Very good, thanks!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now