Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Highly Rated Users

Forum
No Posts Rated

Top 50
Given
Received

Links

Wiki
Blog

Forum Statistics

Users
Members:
1878
Members Online:
2
Guests Online:
54

Total Post History
Posts:
81448
Topics:
18714

7-Day Post History
New Posts:
1
New Topics:
0
Active Topics:
1

Our newest member
kowilmar1990z

Other

FAQ
All times are UTC [ DST ]

Google Ads

Retrieving database

Please wait...

Retrieving database

Postby tperri on Wed May 23, 2012 2:20 pm

Making a long story short, a server one of my clients has was acting up, so the ISP removed the hard drive from it, and placed it into a new server. The new server is a brand new Server 2008 RC2 instance.

I wasn't able to backup the database (also 2088 RC2), but the hard drive SQL management studio & all files are located on is present in the new server.

I have not installed SQL Server on the new server yet in hopes that I may be able to get at the database on the now 2nd drive in the server.

Do I have any options?

thanks in advance for helping, guys :)
tperri
LTD Senior Moderator
LTD Senior Moderator
LTD Bronze - Rating: 17
 
Posts: 130
Joined: Fri Nov 02, 2007 4:38 am
Location: Las Vegas, NV
Unrated

Re: Retrieving database

Postby SQLDenis on Wed May 23, 2012 2:23 pm

So the databases are not cleanly detached right?

See here for some info if you can't attach it with the log file

Recover a database without the ldf file
User avatar
SQLDenis
LTD Admin
LTD Admin
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
 
Posts: 21784
Joined: Wed Oct 10, 2007 6:43 pm
Location: Princeton, New Jersey, USA,World, Solar System, Milky Way, Universe and Beyond

Re: Retrieving database

Postby tperri on Wed May 23, 2012 2:43 pm

Denis,

So you are saying my first step is to try to attach using the log files? I haven't tried anything at all.

Should I move the log files onto the new drive where my new instance of Sql Server will be installed, and then try from there? I have never tried to recover data from log files, so I will be looking that up too :)

Thanks for the help!
tperri
LTD Senior Moderator
LTD Senior Moderator
LTD Bronze - Rating: 17
 
Posts: 130
Joined: Fri Nov 02, 2007 4:38 am
Location: Las Vegas, NV
Unrated

Re: Retrieving database

Postby SQLDenis on Wed May 23, 2012 2:48 pm

In general when you detach the files, you copy both the ldf and mdf files to the new machine and then attach them
User avatar
SQLDenis
LTD Admin
LTD Admin
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
 
Posts: 21784
Joined: Wed Oct 10, 2007 6:43 pm
Location: Princeton, New Jersey, USA,World, Solar System, Milky Way, Universe and Beyond
Unrated

Re: Retrieving database

Postby onpnt on Wed May 23, 2012 3:20 pm

Sounds like you only have one option since there is no current backup and that is what Denis gave you. Well, two options but attaching the mdf + ldf (and any ndf's) is the primary option. Now, if the ldf is not available, that will be the recovery method Denis linked to which is ok kind of. You have the potential for the database not attaching when it tries to create the new ldf, becoming suspect or losing transactions. If any of those do happen, don't worry, there is ways to still get it back online (with what we can hope, minimal loss of data)

Let us know what happens when you get the ldf. If you don't have the ldf, attach it and remove the line that states the ldf cannot be found and try again
Tarwn: Yeah yeah, all you do is SELECT * all day long and say "no" to people...Life of a DBA
User avatar
onpnt
LTD Admin
LTD Admin
LTD Silver - Rating: 623LTD Silver - Rating: 623LTD Silver - Rating: 623LTD Silver - Rating: 623LTD Silver - Rating: 623
LTD Silver - Rating: 623LTD Silver - Rating: 623LTD Silver - Rating: 623LTD Silver - Rating: 623
 
Posts: 1608
Joined: Tue Oct 09, 2007 5:23 pm
Location: Kenosha, WI
Unrated

Re: Retrieving database

Postby tperri on Wed May 23, 2012 7:06 pm

Thanks guys, luckily I had both.

Obviously, a DBA I am not. haha. But now I know :)
tperri
LTD Senior Moderator
LTD Senior Moderator
LTD Bronze - Rating: 17
 
Posts: 130
Joined: Fri Nov 02, 2007 4:38 am
Location: Las Vegas, NV
Unrated