question

cstephen avatar image
cstephen asked

When i am trying to execute stored procedure in the local drive...at the time of complilation error shows..

I want to compile stored procedure in the local drive.In local drive i placed whole stored procedures in one folder.Then i open stored procedure in the particular server environment and when i trying to execute stored procedure at that time Error Show like this.. Msg 823, Level 24, State 2, Procedure scovwnt_sp_ntsuihref, Line 417 The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x00000071f1a000 in file 'D:\ETADatabases\SCMDB.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
stored-proceduresexecute
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
Stored procedures in folders aside, you have a consistency error in your database. You need to run DBCC CHECKDB and validate the consistency of the database. The errors will be on a particular object. If it's a non-clustered index, the fix is easy, drop and recreate the index. If it's on a table, you will probably need to go to your backups and restore the database.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Wimbush avatar image
David Wimbush answered
So do the SQL error log or the event log give any further details? Can you examine the database in SQL Management Studio? Do you have a D:\ drive? Is it working? Is that file on it? Does the SQL Server service accuont have read/write access to it?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.