Suspect Database

Last Post 27 Jul 2010 04:18 AM by rm. 13 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
river1
New Member
New Member

--
13 Jul 2010 01:07 AM

Hi Masters,

  I have a big problem...

My client, after the server went down got the status of one database as Suspect, then he copied the .mdf datafile to other location and deleted the database from SQL Server 2000...
BIG MISTAKE

Now, he sent to me the DMF file, so i can see if i can recover it.


I have create a new database with the exact same size as the one that was on the Client's server. Then i stoped SQL Server 2000 service and swap the datafile for this datafile that the client gave me.

Then, i have made the following procedures on SQL query analiser:

exec sp_configure 'allow updates',1
reconfigure with override
go

update master..sysdatabases
set status ='32768'
where name ='My_database'
go

exec sp_configure 'allow updates',0
reconfigure with override
go
 

Then i restarted the SQL Server service and then made the following command:

dbcc rebuild_log ('My_database','c:\My_database_log.ldf')

then , when i try to acccess the database i keep receive the following error:


Cannot open database 'SGT' version 0. Upgrade the database to the latest version.


What can i do to recover this database?

Thank you,

    Pedro

rm
New Member
New Member

--
13 Jul 2010 04:14 AM
Did you do that on sql2k with same sp leval as your client's server?
river1
New Member
New Member

--
13 Jul 2010 04:45 AM
Yes, the same version... (SP4)
river1
New Member
New Member

--
13 Jul 2010 04:53 AM

The column version of the sysdatabases is set to 0 and other databases are 539.....

 

Very strange...

russellb
New Member
New Member

--
13 Jul 2010 11:22 AM
he doesn't have a backup?
river1
New Member
New Member

--
13 Jul 2010 10:00 PM
No Master Russellb, they do not have a backup
russellb
New Member
New Member

--
14 Jul 2010 04:01 AM
I would try (1) manually updating the version # and (2) ALTER DATABASE dbName SET ONLINE and see what happens
river1
New Member
New Member

--
14 Jul 2010 04:45 AM
The problem is:

How do you update the column version manual if it is a computed column?


Thank you
river1
New Member
New Member

--
14 Jul 2010 05:35 AM
"I would try (1) manually updating the version # "

How do you do this? It's a computed column...

rm
New Member
New Member

--
14 Jul 2010 01:34 PM
Find out formula and update source column.
river1
New Member
New Member

--
15 Jul 2010 12:27 AM
Find out formula and update source column??????????? how can i find out the formula???? that maybe a microsoft secret or something like that....
rm
New Member
New Member

--
15 Jul 2010 03:56 AM
Formula is (convert(smallint,databaseproperty([name],'version')))
river1
New Member
New Member

--
15 Jul 2010 04:09 AM
hum....

(convert(smallint,databaseproperty(SGCT,'539')))

but column should i update in master..sysdatabases? It can not be the version column, because it is a computed column.

i have to make:

update master..systabases set X = (convert(smallint,databaseproperty(SGCT,'539')))????
rm
New Member
New Member

--
27 Jul 2010 04:18 AM
What do you get with 'select convert(smallint,databaseproperty(SGCT,'539'))'?


Acceptable Use Policy
---