Thursday, March 29, 2012

Help with corrupt mdf file

I really hope someone out there can help me with this one... My company
recently acquired another company that was using SQL Server 7. The machine
that the database was housed on began to have hard drive issues. We were
able to extract the mdf and ldf files before the hard drives crashed
completely. When attempting to load these files into a SQL Server 2k
database, we hit a wall. SQL Server 2k refuses to attach the mdf file,
saying that the file is not an mdf file. We also received a similar error
in Query Analyzer, using both sp_attach_db and sp_attach_single_file_db;
this error claimed that the file name might be incorrect.
After this failure, we created a new database, stopped the services, and
switched the mdf files with the new databases. This brought the database up
in suspect mode. We were then able to switch it to suspect/emergency mode.
From here, we attempted a dbcc checkdb, which errored out with an version
error. We also attempted to import the data from the new emergency db into
a newer clean db. This failed with a login error, even though we were
logged in under sa.
I realize that we will probably not be able to retrieve all of the records
from the corrupt file, but does anyone know a way to access any of the data?
Any ideas or suggestions are welcome.
P.S. all of the servers that we manage are backed up daily... just trying
to fix another company's error
Thanks,
JoeOne of the things you might try to do is to attach it to a SQL 7 server..
Then the upgrade will not have to occur...
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Joe" <joe@.nospam.com> wrote in message
news:uFAJlKCwDHA.1888@.TK2MSFTNGP10.phx.gbl...
> I really hope someone out there can help me with this one... My company
> recently acquired another company that was using SQL Server 7. The
machine
> that the database was housed on began to have hard drive issues. We were
> able to extract the mdf and ldf files before the hard drives crashed
> completely. When attempting to load these files into a SQL Server 2k
> database, we hit a wall. SQL Server 2k refuses to attach the mdf file,
> saying that the file is not an mdf file. We also received a similar error
> in Query Analyzer, using both sp_attach_db and sp_attach_single_file_db;
> this error claimed that the file name might be incorrect.
> After this failure, we created a new database, stopped the services, and
> switched the mdf files with the new databases. This brought the database
up
> in suspect mode. We were then able to switch it to suspect/emergency
mode.
> From here, we attempted a dbcc checkdb, which errored out with an version
> error. We also attempted to import the data from the new emergency db
into
> a newer clean db. This failed with a login error, even though we were
> logged in under sa.
> I realize that we will probably not be able to retrieve all of the records
> from the corrupt file, but does anyone know a way to access any of the
data?
> Any ideas or suggestions are welcome.
>
> P.S. all of the servers that we manage are backed up daily... just
trying
> to fix another company's error
> Thanks,
> Joe
>|||Wayne,
I think your system clock or time zone is a bit off..., not sure if you have
noticed.
--
- Anith
( Please reply to newsgroups only )|||thanks... my region was wrong... sorry.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Joe" <joe@.nospam.com> wrote in message
news:uFAJlKCwDHA.1888@.TK2MSFTNGP10.phx.gbl...
> I really hope someone out there can help me with this one... My company
> recently acquired another company that was using SQL Server 7. The
machine
> that the database was housed on began to have hard drive issues. We were
> able to extract the mdf and ldf files before the hard drives crashed
> completely. When attempting to load these files into a SQL Server 2k
> database, we hit a wall. SQL Server 2k refuses to attach the mdf file,
> saying that the file is not an mdf file. We also received a similar error
> in Query Analyzer, using both sp_attach_db and sp_attach_single_file_db;
> this error claimed that the file name might be incorrect.
> After this failure, we created a new database, stopped the services, and
> switched the mdf files with the new databases. This brought the database
up
> in suspect mode. We were then able to switch it to suspect/emergency
mode.
> From here, we attempted a dbcc checkdb, which errored out with an version
> error. We also attempted to import the data from the new emergency db
into
> a newer clean db. This failed with a login error, even though we were
> logged in under sa.
> I realize that we will probably not be able to retrieve all of the records
> from the corrupt file, but does anyone know a way to access any of the
data?
> Any ideas or suggestions are welcome.
>
> P.S. all of the servers that we manage are backed up daily... just
trying
> to fix another company's error
> Thanks,
> Joe
>|||I'm with Wayne. A secondary option can be to try
http://www.officerecovery.com/mssql/, not sure how much help such a tool can
be, though.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OSKheOCwDHA.1680@.TK2MSFTNGP12.phx.gbl...
> One of the things you might try to do is to attach it to a SQL 7 server..
> Then the upgrade will not have to occur...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Joe" <joe@.nospam.com> wrote in message
> news:uFAJlKCwDHA.1888@.TK2MSFTNGP10.phx.gbl...
> > I really hope someone out there can help me with this one... My company
> > recently acquired another company that was using SQL Server 7. The
> machine
> > that the database was housed on began to have hard drive issues. We
were
> > able to extract the mdf and ldf files before the hard drives crashed
> > completely. When attempting to load these files into a SQL Server 2k
> > database, we hit a wall. SQL Server 2k refuses to attach the mdf file,
> > saying that the file is not an mdf file. We also received a similar
error
> > in Query Analyzer, using both sp_attach_db and sp_attach_single_file_db;
> > this error claimed that the file name might be incorrect.
> >
> > After this failure, we created a new database, stopped the services, and
> > switched the mdf files with the new databases. This brought the
database
> up
> > in suspect mode. We were then able to switch it to suspect/emergency
> mode.
> > From here, we attempted a dbcc checkdb, which errored out with an
version
> > error. We also attempted to import the data from the new emergency db
> into
> > a newer clean db. This failed with a login error, even though we were
> > logged in under sa.
> >
> > I realize that we will probably not be able to retrieve all of the
records
> > from the corrupt file, but does anyone know a way to access any of the
> data?
> > Any ideas or suggestions are welcome.
> >
> >
> > P.S. all of the servers that we manage are backed up daily... just
> trying
> > to fix another company's error
> >
> > Thanks,
> >
> > Joe
> >
> >
>sql

No comments:

Post a Comment