Database of Acumatica is in Recovery Pending condition

Hello everybody,

recently I've got interesting situation, when my database for Acumatica developed turned to be in Pending condtion. In order to deal with it, I've executed following SQL:

ALTER DATABASE YourDatabase SET EMERGENCY;
GO
ALTER DATABASE YourDatabase set single_user
GO
DBCC CHECKDB (YourDatabase, REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;
GO
ALTER DATABASE YourDatabase set multi_user
GO

and my database turned back to normal.

Update on 10/08/2019

declare @dbName nvarchar(50);
set @dbName = 'yourDatabase';
 
exec( 'ALTER DATABASE' +@dbName  + ' SET EMERGENCY;')
 
exec ('ALTER DATABASE ' + @dbName + '  set single_user')
 
exec ('DBCC CHECKDB (' + @dbName + ' , REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;')
 
exec ('ALTER DATABASE ' + @dbName +' set multi_user');

I've modified script to a bit another

No Comments

Add a Comment