Error: "A severe error occurred on the current command" when attempting query which uses any form of sorting
I'm working with a clients on-site SQL Server and an Access front-end
Recently I started getting an error in Access when I attempted to write to one of the tables in the database. I was unable to resolve this issue from within Access so I turned to SSMS and now when I run this query
SELECT TOP 1000 *from tbl_Cygnet_Readings_Frequent order by report_DT
You should also check the whole database by DBCC CHECKDB.
And you should also recreate all indexes.
Additional steps would be to create a copy of the table and test your queries on the new table.
Then you could tell what SQL Server version and SP or CU are we talking about. Some versions need to apply service packs to fix this error.
If everything fails you have to contact Microsoft and provide them the SQLDump file.
Dale Fye
ASKER
This started about a 10 days ago, and other emergencies prohibited me from doing much with it until now. The good news is that I have a full backup from several days before that which is not generating this error, so I'll restore the database from the full and regenerate the numbers.
Pavel Celba
If the table was not updated after the backup then restore is OK.
If you are OK with data loss then the restore is also OK.
You should investigate whether the issue is in the table itself or in its indexes. If just indexes are corrupted then you may simply recreate them w/o data loss. Of course, clustered index corruption means data corruption obviously.
DBCC CHECKTABLE ('tbl_Cygnet_Readings_Freq
More info: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checktable-transact-sql?view=sql-server-ver15
You should also check the whole database by DBCC CHECKDB.
And you should also recreate all indexes.
Additional steps would be to create a copy of the table and test your queries on the new table.
Then you could tell what SQL Server version and SP or CU are we talking about. Some versions need to apply service packs to fix this error.
If everything fails you have to contact Microsoft and provide them the SQLDump file.