Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cf46sr
Starting Member
4 Posts |
Posted - 2005-11-20 : 12:38:17
|
I have just deleted a clients database by mistake ( working too many hours this weekend!). I have recovered the actual files with Ontrack file recovery software.I have tried to attach the mdf but SQL says it's not a valid sql database file. I have also created a new database of the same name , stopped sql, copied over the original files and re-started sql . SQL ( 2000) then marks the datbase as suspect.Does anyone have a possiblethxStressed & Desperate.No backups available . No lectures please... i've just learn't the VERY hard way !! <edit> Moved to Data Corruption forum </edit> |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-11-20 : 13:17:55
|
You can try running sp_resetstatus (details are in Books Online) and see if the database comes up after you restart SQL Server. If that does not work (and you haven't tried this already) try attaching just the MDF file using sp_attach_db_single_file, and let it re-create a new log file. After that you'll probably need to contact MS Product Support, they might have one or two other ideas.Naturally, if you are successful, you'll make a full backup immediately and keep it somewhere safe, to start off your new regular backup procedure. |
|
|
cf46sr
Starting Member
4 Posts |
Posted - 2005-11-20 : 13:55:23
|
robvolk ,Thanks for the quick reply. but resetting the status does not seem to help .After restarting MSSQL it is still marked as supspect so I cannot run an queries against this.Below are the logs.Server Process ID is 5232.2005-11-20 13:37:08.51 server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL\log\ERRORLOG'.2005-11-20 13:37:08.53 server SQL Server is starting at priority class 'normal'(2 CPUs detected).2005-11-20 13:37:08.56 server SQL Server configured for thread mode processing.2005-11-20 13:37:08.57 server Using dynamic lock allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.2005-11-20 13:37:08.60 server Attempting to initialize Distributed Transaction Coordinator.2005-11-20 13:37:09.68 spid4 Starting up database 'master'.2005-11-20 13:37:09.92 server Using 'SSNETLIB.DLL' version '8.0.766'.2005-11-20 13:37:09.92 spid5 Starting up database 'model'.2005-11-20 13:37:09.93 spid4 Server name is 'WEBSVR'.2005-11-20 13:37:10.01 spid8 Starting up database 'msdb'.2005-11-20 13:37:10.01 spid9 Starting up database 'pubs'.2005-11-20 13:37:10.01 spid11 Starting up database 'Northwind'.2005-11-20 13:37:10.01 spid10 Starting up database '62NOSP1'.2005-11-20 13:37:10.04 server SQL server listening on 66.xxx.203.xxx: 1433.2005-11-20 13:37:10.04 server SQL server listening on 127.0.0.1: 1433.2005-11-20 13:37:10.04 server SuperSocket Info: Bind failed on TCP port 1433.2005-11-20 13:37:10.09 spid10 The header for file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\62NOSP1_Data.MDF' is not a valid database file header. The PageAudit property is incorrect.2005-11-20 13:37:10.18 spid5 Clearing tempdb database.2005-11-20 13:37:10.35 server SQL server listening on TCP, Named Pipes.2005-11-20 13:37:10.35 server SQL Server is ready for client connections |
|
|
paulrandal
Yak with Vast SQL Skills
899 Posts |
Posted - 2005-11-20 : 16:17:38
|
The file header is damaged beyond the scope of anything you can do through SQL Server. You need to find someone who has deep internals knowledge of SQL Server to manually hex edit the broken file - note that PSS will not do this. Failing that I would get a lawyer.Paul RandalLead Program Manager, Microsoft SQL Server Storage Engine(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.) |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-11-20 : 21:47:01
|
Did you have a backup? I don't see where you say you did or did not have one.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-11-21 : 01:24:19
|
"Did you have a backup? "Derrick: cf46sr says:No backups available . No lectures please... i've just learn't the VERY hard way !! Kristen |
|
|
|
|
|
|
|