Sometimes this error makes us very sad. But this is a very simple error which is easily recovered. this is happening due to loss of drive or any other reason. the main reason is that you lost the drive or you remove and reattached drive with the system
I have a simple solution for this. you just need to do 3 lines of code.
1 you need to attach or connect your device. if already connected don't think over
2.you need to take the database offline
3.after database is offline remake online your database
syntax
Alter database [DatabaseName] set offline
wait for a minute
Alter database [DatabaseName] set Online
this three-step solve The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset. this error
I have a simple solution for this. you just need to do 3 lines of code.
1 you need to attach or connect your device. if already connected don't think over
2.you need to take the database offline
3.after database is offline remake online your database
syntax
Alter database [DatabaseName] set offline
wait for a minute
Alter database [DatabaseName] set Online
this three-step solve The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset. this error
0 Comments
thank you for your comment