通过查看profiler报告中的EventSubClass列,该列显示为整数类型,具体的意义如下表所示。
SQL Server 2000 SP2
Integer code Reason for recompilation
-----------------------------------------------------------------------
1 Schema, bindings, or permissions changed between compile or execute.
2 Statistics changed.
3 Object not found at compile time, deferred check to run time.
4 Set option changed in batch.
5 Temp table schema, binding, or permission changed.
6 Remote rowset schema, binding, or permission changed.
SQL Server 2005
Integer code Reason for recompilation
-----------------------------------------------------------------------
1 Schema changed.
2 Statistics changed.
3 Recompile DNR.
4 Set option changed.
5 Temp table changed.
6 Remote rowset changed.
7 For browse perms changed.
8 Query notification environment changed.
9 MPI view changed.
10 Cursor options changed.
11 With recompile option.
如何通过profiler获知存储过程recompile的原因
最新推荐文章于 2023-08-08 20:00:28 发布