Page 1 of 1

SQL DATABASE need to recover - cmd line

Posted: May 30th, 2009, 20:03
by zebong
Hi to all,

I have copy a disk with some SQL databases and could copy about 98% off the sectors for the database.
But is missing 2% off that sectors, anyone experience in SQL server know the command line to repair the database?

Please PM me


Thanks
ZeBong

Re: SQL DATABASE need to recover - cmd line

Posted: May 31st, 2009, 7:07
by N.C.
Hi,

It depends on sql type, but for mysql the procedure looks like this:
USE [database]
REPAIR TABLE [table]

If it is failing, try outside of the server with myisamchk.

http://dev.mysql.com/doc/refman/5.0/en/ ... table.html

Always make a backup before trying to repair the table!

Janos