backup failed – backup database failed (database 'msdb...

3
Backup failed – Backup Database Failed (Database 'msdb' cannot be opened. it has marked SUSPECT by recovery) Solution 1 1. Open SQL Server Management Studio 2. Login as User Name: sa Password: QnE123!@# 3. Open new query window (Ctrl + N) 4. EXEC sp_resetstatus msdb; (Explanation: sp_resetstatus turns off the suspect flag on a database. This procedure updates the mode and status columns of the named database in sys.databases. Also note that only logins having sysadmin privileges can perform this.) 5. ALTER DATABASE msdb SET EMERGENCY; (Explanation: Once the database is set to EMERGENCY mode it becomes a READ_ONLY copy and only members of sysadmin fixed server roles have privileges to access it.) 6. DBCC checkdb (msdb); (Explanation: Check the integrity among all the objects.) 7. ALTER DATABASE msdb SET SINGLE_USER WITH ROLLBACK IMMEDIATE; (Explanation: Set the database to single user mode.) 8. DBCC CheckDB (msdb, REPAIR_ALLOW_DATA_LOSS); (Explanation: Repair the errors) 9. ALTER DATABASE msdb SET MULTI_USER; (Explanation: Set the database to multi user mode, so that it can now be accessed by others.)

Upload: lynguyet

Post on 30-Apr-2018

240 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Backup failed – Backup Database Failed (Database 'msdb ...supportsystem.livehelpnow.net/resources/3203/Backup failed... · Backup failed – Backup Database Failed ... Solution

Backup failed – Backup Database Failed (Database 'msdb' cannot be opened. it has marked

SUSPECT by recovery)

Solution 1

1. Open SQL Server Management Studio

2. Login as User Name: sa Password: QnE123!@#

3. Open new query window (Ctrl + N)

4. EXEC sp_resetstatus msdb;

(Explanation: sp_resetstatus turns off the suspect flag on a database. This procedure updates

the mode and status columns of the named database in sys.databases. Also note that only logins

having sysadmin privileges can perform this.)

5. ALTER DATABASE msdb SET EMERGENCY;

(Explanation: Once the database is set to EMERGENCY mode it becomes a READ_ONLY copy and

only members of sysadmin fixed server roles have privileges to access it.)

6. DBCC checkdb (msdb);

(Explanation: Check the integrity among all the objects.)

7. ALTER DATABASE msdb SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

(Explanation: Set the database to single user mode.)

8. DBCC CheckDB (msdb, REPAIR_ALLOW_DATA_LOSS);

(Explanation: Repair the errors)

9. ALTER DATABASE msdb SET MULTI_USER;

(Explanation: Set the database to multi user mode, so that it can now be accessed by others.)

Page 2: Backup failed – Backup Database Failed (Database 'msdb ...supportsystem.livehelpnow.net/resources/3203/Backup failed... · Backup failed – Backup Database Failed ... Solution

Solution 2

1. Open Control Panel Administrative Tools Services

2. Select SQL Server (QNEBSS) item from services right-click Stop

3. Select SQL Server (QNEBSS) item from services right-click Properties

4. Obtain the “Path to executable” and Open C:\Program Files\Microsoft SQL Server\MSSQL11.QNEBSS\MSSQL\DATA

Page 3: Backup failed – Backup Database Failed (Database 'msdb ...supportsystem.livehelpnow.net/resources/3203/Backup failed... · Backup failed – Backup Database Failed ... Solution

5. Cut MSDBData.mdf & MSDBlog.ldf to any other place

6. Then go to C:\Program Files\Microsoft SQL Server\MSSQL11.QNEBSS\MSSQL\Binn\Templates

7. Copy MSDBData.mdf & MSDBlog.ldf and paste back to

C:\Program Files\Microsoft SQL Server\MSSQL11.QNEBSS\MSSQL\DATA

8. Then go back to Services

9. Select SQL Server (QNEBSS) item from services right-click Start