Internal Error while doing SQL SELECT statement.

ACDBA 416 Reputation points
2022-03-03T12:25:26.077+00:00

Hi All,

I have a view which joins 6 small tables together. Table size is small and the total count is around 37K records and select runs in less than 7 seconds. Tables are selected with no lock hints.
There is not much change in data or in volume.

But sometimes SQL is terminating the view saying "Internal Error: Text manager cannot continue with the current statement. Run DBCC CHECKTABLE"

There are frequent executions of this view and its immediate runs get successful.(Next schedule ran after 2 min)

Based on the error messages, we are did run DBCC CHECKTABLE and couldn't find any issues. we did CHECKDB as well.

But this happens intermittently

Can this be due to any specific data in the table?

Also, How do we troubleshoot this issue?

There are no other errors logged in the same server and also in its AG replica.

Thanks,
ACDBA

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,808 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,558 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tom Phillips 17,716 Reputation points
    2022-03-03T20:05:26.737+00:00

    This error is almost always related to an external issue. Check your SQL Server log and Windows event log for errors.

    1 person found this answer helpful.
    0 comments No comments

  2. Tom Phillips 17,716 Reputation points
    2022-03-03T13:06:51.66+00:00

    You did not tell us the version of SQL Server you are using. Please post the results of SELECT @@VERSION.

    Also make sure you have the latest patch level installed.

    https://learn.microsoft.com/en-US/troubleshoot/sql/general/determine-version-edition-update-level


  3. Erland Sommarskog 101.8K Reputation points MVP
    2022-03-03T22:49:21.247+00:00

    Tables are selected with no lock hints.

    What happens if you stop using these? I would be surprised if this the root of the problem.

    Generally, NOLOCK is something you should use very sparingly in application code, as it often can lead to intermittent incorrect results.