??? ???? SQL Server ???? ????? ???????

?????? ????????? ?????? ?????????
???? ???????: 263889 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

?? Microsoft SQL Server? ???? ????? ??? ?? ??? ??????? ?????? ???? ??? ?? ????? ??????? ?????? ?? ??? ???????. ??? ??? ????? ??????? ??? ??????? ?? ????? ???????? ???? ????? ??? ???????? ???????? ????? ????? ?????. ??? ???? ????????? ???? ?????? ??? ??????? ?????? ????? ????? ??? ?????? ????? ???? ??????? ?????? ?? ??? ??? ??????? ?? ???? ????? ?????? ?????? (SPIDs) ???? ????? ????? ??? ?? ?????? ?????? ??? ????? ????? ??? ??????.

??????? ????

recompilation ??????? ?????? ??? ???? ?????? ??????? ??? ????? ???? ?? ??????. ?? ??? ?????? ?? ???? ?????? ?? ?????? recompiles. ?????? ??? ??? ??????? ?????? ?????? ???? ?? ???? ????? ???? ??? recompiled ???? ????????? ??????? ??? ????? ????? recompiles? ???? ????? "????? ??????? ? Microsoft" ???????:
243586??????? ??????? ???????? recompilation ????? ????
???????? ??? ??? ???? ????? ??????? ??? ????? ?????? ???????:
  • ???????? ???? ???? ?????? ????? ???? ??? ???? ???????.
  • ??? ??????? ?????? ??? ???? ???? ???? ?? ??? ???? ??????.
??? ???? ??????? ??? ??? ???? ???????? "dbo" ????dbo.mystoredproc????? ??????? ??? "Harry" ????? ??? ??????? ?????? ???????? ??????? "exec mystoredproc?" ????? ??????? ??????? ?????? ???? ??? ?????? ??? ?????? ??? ???? ??????. (?? ??? ??????? ????? ??? ????? ???? ???? Harry.mystoredproc. ?????? SQL Server ?? ???? ?? ????? ?????? ?????? ??? ??????? ?????? ? dbo.mystoredproc.) ???? SQL ?? ???? ??? ????? ????? ??? ??????? ?????????? ????? ???????. ?????? ??? ????? ??? ?????? ????? ????. ??? ????? SQL Server ?????? ?????? ???? ??? ?????? ?????? ??? ???? ??? ?? ????? ??????? ?????? ??????? SQL Server ????? ????? ???? ??? ?????? ?????? ??? ???? ????? ??????.

??? ?? ?????? ??? ???? ?????? ???? SQL Server ???? ??????? ??? ??????? ?????? ???? ?????? ????? ??????? ??????. ??? ???? ???? ??? ????-????? SQL Server ?????? ?????? ?? ???? ?????? ??????? ???? ??????? ????? ????? ??? ??? ?? ???? ???????? ???? ????? ??????? ??? ????? ??????? ?????? ????????. ???? ?????? ??? ??????? ?????? ?????? ????? ?????? ????? ??????? ?????? ??? ??? ?????? ?????? ?? ????? ??????? ??????? ??????? ???? ???? ??? ???. ???? ??? ?????? ???? ??? ???? ?????? ?? ?????????? ??? ???? ??????? ?????? ???? ?????? ?????? ??????? ??? ????? ??? ??????. ??? ?? ???? ??? ??? ??? ?? ??? ??? SPIDs ?????? ????? ???????? ??? ????-????? ???? ????? ??????? ?? ????? ??????? ?????? ????? ??????? CPU ????? ?????.

??? ????? ??????? ?????? ?? ??????? ?? ????? ???? Profiler ???? SQL ??? ???? ??? ???????. (????? ??????? ???????? ?????? ??????? ??????? ??? ????? ??????? ????????. ?????? ????? ???? ???????????????????????? ??? ?????????? ???? ???????.)

?? ??? ??????????? ??? ??????
??? ?????????
RPC: ??? ?????mystoredproc
SP:CacheMissmystoredproc
SP:ExecContextHitmystoredproc
???? ?????? SP: ??? ?????mystoredproc
......

SP:CacheMiss???? ??? ??? ????? ??????? ?????? ??? ?????. ???? ???SP:ExecContextHit???? ??? ??? ??????? ?????? ?????? ?? ??????? ?????? ??? ?? ????? ??????? ?????? ??? ??? ?????? ????? ?? ???? ??? ???? ????. ???????? ??? ???????SP:CacheHit?? ???? ????? ??SP:ExecContextHit.

??? ?? ??? ??????? ?? ????? ??????? ??????? ?????? ?? ?? ???? ??????? ??? ??????? ????? ???? ??????. (????? ??exec mystoredproc? ?????? execdbo.mystoredproc.) ????? ???? ????-????? ?????? ?????? ????? ???????? ?? ???? ????? proc ??????? ?? ??? ????? ???????? ???? ????? ??????? ?????? ??????.

??? ???? ?? ???? ??????? ???? ?????? ??????? ???????? ??????? ?????? ??? ??? ??? ???? ?? ??????? ?? ?????? "????? ??????? ? Microsoft" ???????:
251004??? INF: ????? ?????? ??? SQL Server 7.0
271509INF: ????? ?????? ??? SQL Server 2000
???? ??? ??? ???????? ?????? ???? ??????? ???? ???? ???????? ?? ????? ???????? ????? ???:
  • lastwaittype??????? SPIDs ???????? ?????? (????) ?? LCK_M_X (????) ?waitresource???? ??????? "TAB: dbid:object_id[[?????]]? "??? ????" object_id "???? ?????? ??????? ??????.
  • ???? ???? blockerswaittype0x0000 runnable ??????. ?? blockeeswaittype0x000e (????? ????????? ?????)? ???? ????.
  • ???? ????? ?? ??? ?? ???? ?????? ????? ????? ?????? ????? ?? SPID ???? ??? ??? SPIDs ?????? ????? ?????. ???? ??? ??????. ????? ?????? ??????? ??????? ????? ???? SPID ??? ??? ??? ??? ???????? ????? ???? ???? ?? ???? ?????.
????????? ??????? ?? ???? ??sysprocesses????? ??? ????? ?? ???:
   spid  blocked  waittype  waittime  lastwaittype  waitresource
   ----  -------  --------  --------  ------------  -------------------------
   
   221    29      0x000e    2141      LCK_M_X       TAB: 6:834102 [[COMPILE]]
   228    29      0x000e    2235      LCK_M_X       TAB: 6:834102 [[COMPILE]]
    29   214      0x000e    3937      LCK_M_X       TAB: 6:834102 [[COMPILE]]
    13   214      0x000e    1094      LCK_M_X       TAB: 6:834102 [[COMPILE]]
    68   214      0x000e    1968      LCK_M_X       TAB: 6:834102 [[COMPILE]]
   214     0      0x0000       0      LCK_M_X       TAB: 6:834102 [[COMPILE]]
??waitresource???? ("6:834102")? 6 ???? ????? ???????? ? 834102 ???? ??????. ??? ?? ???? ?? ???? ?????? ??? ????? ??? ????? ????? ?? ??? ???? (?????? ?? ??? ????? "TAB").

???????
  • ??? ??? ?????? SQL Server 2005? ?????? ?? ????? ?????? ?? SQL Server 2000 ??? ???? ????? ??????? ?? ??? ?????. ????? ??? ????? ??????? ??? ??? ????? ???? ????? ???? ??????? ?? ????????? ???????. ???? ??? ????? ??????? ??? ?????? ??????? ??????? ?? SQL Server 2000. ????? ?? ????????? ??? ????? ??? ????? ???? SQL Server 2000 ???? ????? ????? SQL Server 2005? ???? ??????? ??? "????? SQL Server 2000 ?????? ????? ??? SQL Server 2005 ?????? ???" ?? SQL Server 2005 ??? ??? ??????.
  • ??? ??? ??? ??????? ?????? ????? ?? ???? ???????? "sp_" ???? ?? ????? ???????? ????????? ????SP:CacheMiss??? ????? ??????? ?????? ????? ??? ??? ??? ????? ??? ????-????? ??????? ??????. ??? ???? ????? ??????? sp_ ??????? ?????? SQL Server ?? ??????? ?????? ????? ????? ????? ??????? ????? ??? ??? ???. (???? "???????" ?? ????? ???????? ????????.) ?? ??? ?? ???? ????? ????????? ??????? ???? ??? ???????? ???????? ???????? "sp_".
  • ??? ?? ??? ????? ????? ???? ?????? ???? ???? ?????? ?? ????? ??????? ???? ?????? ?? ??????? ???? ?????? ???? ?????? ???CacheMiss?? ??? ????? ????? ???? ???? ???????? ??? ??????? ??????. ?????? ??? ????? ?? ?? ?????? ????? ??????? ???? ?? ?? ????? ????? ????? ??????. ???? ?? ??? ???????? ??? ????? ????? ???? ???? "??? ?????" ??? ??? ???? ?????? ?? SPIDs ?????? ????? ??? ??????? ?? ???? ?????? ?? ??????? ???? ?? ??????? ?. ???? ??? ??? ????? ?? ????? ????? ?? ??????? ???? ??? ???????? ??? ?????? ?? ?? ????? ??????. ?? ????? ?? ??? ?????? ????? ?????????? ???? ??? ????????? ?????? ??? ??????? ?? ????? ??????? ?????? ???? ??????? (?????? ????? ???????)? ????? ???? ?? ????? ???? ?????? ??????.

    ???? ?????? ?????? ??????? ???? ?????? ???????? ??? ??????? ?????? ???????. ????? ???? ?????? ?? ?? ??? ????? ??????? ?? ???? ????????? ???? ?????? ??? ??????.
  • ??? ????? ????? ????? ???? "??? ?????" ????? ?? ???????? ????? ?? ???? SQL Server ??? ????? ?????? ????????? ????? ???? ?????? ?? ????????? ????? ????? ????? ????? ??? ?? ???? ?????? ??? ??? ?? ????? ??????? ?????? ???? ???????. ????? ??? ?????? ???? ??? ????? SQL Server ???????? ????? ?????, ???? ?? ?? ??? ????? ????????? ??? SQL ???????? ????? ?? ???.

    ?????? ??? ???? ?? ?????????? ???? ?????? "??????? ????? ??????" ?? "??? ???????" ??????? "????? ????? ?????."


???????? ????????

???? ??? ??? ???????? ???????? ???? ?? ???? ??? ??????? ??????:
  • You use BLOB variables as a Stored Procedure parameter. ?????? ??? ???? ?? ?????????? ???? ??? ??? ??????? ?????? ???? ??????? ?? ????? ????? Microsoft:
    2380435FIX: The query plan for a stored procedure is not cached if the stored procedure uses a BLOB variable and the variable is used in a string function in Microsoft SQL Server 2008
  • You use OPEN SYMMETRIC KEY in a Stored Procedure/Query Batch. For more information, see the following MSDN blog entry:
    http://blogs.msdn.com/b/sqlserverfaq/archive/2010/09/08/open-symmetric-key-command-prevents-query-plan-caching.aspx

???????

???? ???????: 263889 - ????? ??? ??????: 18/?? ?????/1431 - ??????: 1.0
????? ???
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Workgroup Edition
????? ??????: 
kbinfo kbmt KB263889 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????263889

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com