SQL Server Emergency mode - Syntax incorrect

638 Views Asked by At

I dont know whats the problem with that sql query :

ALTER DATABASE myDB SET EMERGENCY;

i got that error :

Msg 102, Niveau 15, Etat 6, Ligne 1
Incorrect syntaxt near 'EMERGENCY';

I use Microsoft SQL Server 2000 - 8.00.760 and SSMD 2016.

1

There are 1 best solutions below

2
Martin Smith On

I dont know whats the problem

The issue is that you are using SQL Server 2000. Paul Randal mentions here

I decided to add a new feature to SQL Server 2005 called EMERGENCY-mode repair that will do steps 2 and 3 as an atomic operation.

So the syntax you are trying to do does not exist in 2000.

The "hacking system tables" he mentions is described here.

But you should be restoring from backup as first resort here.