Solved

SQL database recovery

Posted on 2011-03-07
5
255 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
ID: 35063369
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
ID: 35063416
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
ID: 35063437
Wait, hold up....had to run as administrator.
0
 

Author Comment

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

Author Closing Comment

by:underIce
ID: 35063530
Very good, thanks!
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

911 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

16 Experts available now in Live!

Get 1:1 Help Now