Dedy
Sometimes you need to remove the "suspect" flag before you do a restore or
transfer - otherwise the device may not show up. In SQL Server 6.5 you have
to do this "by hand" (in SQL Server 7.0 there is sp_resetstatus which does
it). Use the following statement
UPDATE master..sysdatabases SET status = status ^ 256 WHERE name = <dbname>
If the database still goes back into suspect mode, and you can't fix the
original problem, and you have no recent backup, then you can get
information out of the database by putting it into emergency mode. If you
do this, extract the data/objects out with bcp/transfer manager and then
rebuild the database. Note that the data may be corrupt or transactionally
inconsistent.
Issue the following command to put the database into emergency mode (you'll
need to allow updates first)
UPDATE master..sysdatabases SET status=-32768 WHERE name='<dbname>'
(Thanks to Neil Pike for the above details)
Just to be complete, in SQL Server 7 use sp_resetstatus to do this. This
can be executed only by the system administrator. Always shut down SQL
Server immediately after executing this procedure and then restart it.
sp_resetstatus <dbname> will turn off the suspect flag on the <dbname>
database. You still need to do a restore or transfer to guarantee you get
good data back.
Cheers
Peter Garden
Genie Systens Limited
www.geniesystems.com
>I have just tried to create a new database and transfer it
>but, in the destination databsae combo box the suspect database does not
>apear, so how can I specify the suspect databse in destination
>also when I tried to backup, the suspect database does apear
>
>thanks.
>
>
> >From: Dennis Chuah <[EMAIL PROTECTED]>
>
>
> >You can try this (only works in SQL Server 6.5):
>
> >Backup your database first. Create a new database in the >enterprise
> >manager. Right click on the database and select Transfer. In >the
> >destination specify your suspect database. Click Start >transfer.
>
> >Regards,
> >Dennis.
>
>
>
>
> >>My database is marking "suspect" by the system
> >>does anybody know, how to get the data in this database
> >>or to reset the suspect status
>
>
>
>
>---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz