473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can I recover from the database files?

Howdy all -

I am *not* a DBA, so please bear with me. A client's Windows 2000
server went belly up yesterday afternoon after getting updates from
Windows Update. Wouldn't come up at all any more. I broke the mirror
for the OS, rebuilt the Windows 2000 installation, and installed MS-SQL
2000 and SP3 so that now the server is configured identically to what
it was before the crash.

Now I have the databases in D:\Program Files\Microsoft SQL
Server\MSSQL\Data. D: is a mirror of the (now broken) old
installation. How can I get the databases into the active installation
of MS-SQL on the C: drive?

I was thinking of creating databases with the same name, shutting down
SQL and copying the files from D: to C: but that sounds too easy.

Any pointers greatly appreciated. Please remember that I am not an
experienced DBA, so use short words and speak slowly... :-)

Jul 23 '05 #1
1 1583
(th************@gmail.com) writes:
I am *not* a DBA, so please bear with me. A client's Windows 2000
server went belly up yesterday afternoon after getting updates from
Windows Update. Wouldn't come up at all any more. I broke the mirror
for the OS, rebuilt the Windows 2000 installation, and installed MS-SQL
2000 and SP3 so that now the server is configured identically to what
it was before the crash.

Now I have the databases in D:\Program Files\Microsoft SQL
Server\MSSQL\Data. D: is a mirror of the (now broken) old
installation. How can I get the databases into the active installation
of MS-SQL on the C: drive?

I was thinking of creating databases with the same name, shutting down
SQL and copying the files from D: to C: but that sounds too easy.


That would not be the way to do. Rather you should first copy the files
into the place where you want them, and then use sp_attach_db to attach
them to the new server. Keep in mind that you need to copy both MDF and LDF
files. Rather than using sp_attach_db, you can probably find some screen
for this in Enterprise Manager if you prefer.

Now, this may or may not work. If the files were shut down cleanly, it
will work. And since this appeared to have happened after a reboot, there
is a chance that this is the case.

If you get errors on a database, it all gets more complicated. Restoring
from a clean backup could be safest way, and if you also have transaction
log dumps you should be able to come fairly close to the state before
the crash.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: anonymous | last post by:
I've got a disk that had the data files for my mysql server on it. From these files can I rebuild the database? I didn't do backups or anything like that, but I have the whole file system. What I...
4
by: anonymous | last post by:
I've got a disk that had the data files for my mysql server on it. From these files can I rebuild the database? I didn't do backups or anything like that, but I have the whole file system. What I...
5
by: q2face | last post by:
Dear group: I have removed my hard drive from my laptop (which is now toast) and have managed to recover nearly all the data from it by installing the drive into my desktop. I was hoping to...
5
by: Prem K Mehrotra | last post by:
I come from Oracle background. In Oracle, when one wants to do a point in time recovery, one can specify recover database until timestmap. Oracle's database maps to a db2 subsystem, i.e., in...
6
by: KG | last post by:
Hi, Does anyone knows how to recover the test file db2diag.log. By mistake I have delete the contents of db2diag.log, wondering if I could restore the contents of my db2diag.log.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.