Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

After shrinking an SQL Server database & files, I encountered an error message saying "A nonrecoverable I/O error occurred on file" while performing database backup.

Why am I getting this error?

share|improve this question

migrated from stackoverflow.com Jan 21 '12 at 19:05

This question came from our site for professional and enthusiast programmers.

1 Answer 1

After I did the following steps below, I was able to produce a database backup again.

Step 1:

use Test_DB

GO

Step 2:

DBCC CheckDB

GO

Step 3:

  1. Right click the Test_DB database then click properties.
  2. Choose Option page
  3. From Restrict Access option, select Single
  4. Click OK and Open Connections dialog will appear. Click Yes if you want to close all connection connected to the database and change the database on single user mode.

-OR-

ALTER DATABASE Test_DB SET SINGLE_USER WITH NO_WAIT

GO

Step 4:

dbcc checkdb ('Test_DB',repair_rebuild) 

GO

Step 5:

dbcc checkdb ('Test_DB',repair)

GO

Step 6:

ALTER DATABASE Test_DB SET MULTI_USER WITH NO_WAIT

GO
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.