Article # 639
URL: http://kbase.gofrugal.com/index.php?a=639
Category: Nettrade

Error while login NT

Dear Team,

Issue: Following error while open NetTrade



Reason: One of the NetTrade relevant database is corrupted

Solution: Run following query in OSQL to get the database name which is corrupted

select name from sysdatabases where has_dbacess(name)=0

So that you will get the corrupted database name, Then replace that name in following query and execute in OSQL

EXEC sp_resetstatus 'DBNAME';
ALTER DATABASE DBNAME SET EMERGENCY
DBCC checkdb('DBNAME')
ALTER DATABASE DBNAME SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('DBNAME', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE DBNAME SET MULTI_USER
go


NOTE: This will work in SQL 2005 only
Powered By AutoKB