如何在 SQL Server 2008 上调试 EXCEPTION_ACCESS_VIOLATION [英] How can I debug an EXCEPTION_ACCESS_VIOLATION on SQL Server 2008

查看:24
本文介绍了如何在 SQL Server 2008 上调试 EXCEPTION_ACCESS_VIOLATION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个使用数据库的应用程序突然崩溃了.我开始调查并注意到一个简单的计数查询

An application that uses a database broke suddenly. I started to investigate and noticed that a simple count query

SELECT count(uberdataid) FROM [Alexander].[dbo].[UberData]

在 SQL Server 中产生错误:

creates an error in SQL Server:

Msg 0, Level 11, State 0, Line 0当前命令.结果,如果有的话,应该丢弃

Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discard

一些想法:

  • 当我查看错误的堆栈跟踪时,它说有一个 EXCEPTION_ACCESS_VIOLATION.该异常的名称让我认为查询中可能存在权限问题.但是我在许多不同的用户帐户(之前都能够毫无问题地查询数据库)上遇到完全相同的错误.

  • When I check out the error's stack trace it says that there is an EXCEPTION_ACCESS_VIOLATION. The name of that exception makes me think that there might be a permissions issue in the query. But I get this exact same error on many different user accounts (which all were able to query the DB without issue before).

关于 SO(SQL 中的异常访问冲突)的讨论使得我认为查询可能会遇到一个挥之不去的记录锁定,但我已经重新启动了服务器,所以这似乎不太可能.

This discussion on SO ( Exception Access Violation in SQL) makes me think that the query might be hitting a lingering record lock, but I've rebooted the server so that seems unlikely.

在其他在线留言板上还有一些其他未解决的讨论.

There are also some other unresolved discussions on other message boards online.

有什么想法吗?

Stackoverflow 不会让我发布整个跟踪(太长),但如果人们需要查看它们,我很乐意发布相关部分.我不知道跟踪中的哪些部分最重要.

Stackoverflow won't let me post the whole trace (too long) but I am happy to post relevant parts if people need to see them. I don't know what parts from the trace are most important to post.

推荐答案

这看起来像是一个 SQL Server 错误.EXCEPTION_ACCESS_VIOLATION 表示 SQL Server 内部的代码试图访问无效"内存(例如,取消引用 NULL 指针).它与 SQL Server 安全设置无关.

This looks like a SQL Server bug. EXCEPTION_ACCESS_VIOLATION means that code inside of SQL Server tried to access "invalid" memory (for example, dereferencing a NULL pointer). It has nothing to do with SQL Server security settings.

即使这可能是一个错误,我还是建议您运行

Even though this is likely to be a bug, I recommend that you run

DBCC CHECKDB WITH EXTENDED_LOGICAL_CHECKS, DATA_PURITY, NO_INFOMSGS

在有问题的数据库上.可能存在触发 SQL Server 错误的损坏.

on the database in question. There might be corruption that is triggering a SQL Server bug.

这篇关于如何在 SQL Server 2008 上调试 EXCEPTION_ACCESS_VIOLATION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆