FIX: ?????? fn_get_sql ????? ?? SQL ?????? ?? ???? ?????? Sysprocesses

?????? ????????? ?????? ?????????
???? ???????: 325607 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

?????? ??? ??????? ??????? ?????? ???? ?? SQL Server 2000 ???? ???? ??? ????????? ???????:
  • ???? ??????? ???? fn_get_sql ????? ??? ???? ?? ????.
  • ??????? ?????? ???? ??? ????? ????? ????? ??? ????? ????? ??????? sysprocesses ???? ??????:
    • sql_handle(?????)
    • stmt_start(??? ????)
    • stmt_end(??? ????)

  • ???? ??????? ?????? ?????? ????? ???? ????? ? ????? ???? 2861.

????

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ?? Microsoft SQL Server 2000. ????? ?? ?????????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
290211????? ?????? ??? ???? ???? ???? ?? SQL Server 2000
?????? ?? ????? ??????? ?????? ?????? ??? ????? Microsoft SQL Server 2000 Service Pack 3.

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

???? ????? ???? ?? SQL Server 2000 ?????? ???? fn_get_sql.

???? ?????? ??? ???????? ?? Microsoft "?????? ??? ???????. ????? ????? ????? ?????????? ?? ??? ??????? ?????? ???? ????? (?? ???? ????) ??????? ?? ?????? ??????. ??? ??? ???????? ???????? ?????? ???? ??????? ?? "??? ??????? ???????" (UTC). ????? ???? ???? ??????? ?????? ??? ??????? ??? ??????? ??????. ?????? ????? ??? ??????? ??????? (UTC) ???????? ??????? ?????? ????? ??????? ??????? ??????? ?? ???? ??????? ?????? ?? "???? ??????".
   Date         Time      Version    Size              File name
   -----------------------------------------------------------------

   07/01/2002   4:50 PM   8.00.652   7,285 kilobytes   Sqlservr.exe
				
?????? ???? ?????? ?????? ???? ????? ???? ?? ?????? ???? ????? ??? ??????? ?? ????? ????? ??? ????? ??????.

??? ??? ???? ??????? ?? ??? ??????? ??? ????? ???? Sqlservr.exe ???? ?? ?? ????? 8.00.652 ? ? ??? ???? ????? Sp2_qfe_serv_uni.sql ?? ????? ?????? ?? ????? ???. ????? ?? ?????????? ???? Readme.txt ?? ????? ??????? ?? ????? ???????.

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ????? ??? ???????.?? ????? ??? ??????? ???? ??? ?? Microsoft SQL Server 2000 Service Pack 3.

??????? ????

????? ??? ????? ????? ?????? ???? ????? ??? fn_get_sql ??????.

fn_get_sql

????? ?? SQL ?????? ???? ?? ??? ?????? ??????.

???? ??????

fn_get_sql ([@ SqlHandle =] SqlHandle)

???????

[@ SqlHandle =] SqlHandle

???? ???? ?????. ?? SqlHandle binary(20) ?? ???????.

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

?? ??? ??????????? ??? ??????
??? ????????? ???????????
dbid??? ???? ???????? ????? ????????. ????? ?? ?????? ?????? ?????? SQL ?????.
objectid??? ????????? ???? ????? ????????. NULL ?? ?????? ?????? SQL ????? ??????.
?????? ???? ????????? ?? ????? ??????? ??? ??????. 0 ????????? ??? ?????????. ????? ?? ?????? ?????? ?????? SQL ?????.
???????????????? ??? ?? ??? ?? ????? ??????:
0 = ???????
1 = ?????
?????????? SQL. ????? ?? ?????? ?????? ???????? ???????.

???????

?? Fn_get_sql ????? ??? ???? ?? ???? ???? ??? ????? ?? SQL SQLHANDLE ??????. ????? ?????? ??? SQLHANDLE ???? ?? ???? sql_handle ???? ?????? sysprocesses.

??? ??? ?????? ???? ?? ??? ??????? ?? ????? ??????? ?????? ??? fn_get_sql ????? ??????? ?????. ??? ??? ?????? ???? ??? ???? ???? ????? ??????? ?????? ????? ????? ???????:
????: ????? 569 ? 16 ??????? 1 ???? fn_get_sql ????? ????? ?????? ??? fn_get_sql 12 ?? ??? ????.
?? ???? ?? SQL Server ???????? ?????? ??? ?????? SQL ???????? ??? ?????? ??????? ????? ????? ??????? ?? ????? ????? ???? ?? 8 ???? ????. ????? ??? ???????? ??? ????????? ???? ?????? fn_get_sql.

??? ????? ???? ?? ???? ???? ?? ????? ??? ????? ??????. ???? ??????? "?????? ?????" ?? "??? SQL Server ??? ??????" ?????? ??? ?????? ??? ????????? ??????? ??? ????? ??????? ???? ??? ????????.

??????

???? ??? ?????? ??? ???? ???? sysadmin ????? ?????? fn_get_sql.

?????

???? ????????? ???? ??? ??????? ?????? ?????? fn_get_sql ????? INPUTBUFFER DBCC. ?????? ?????? fn_get_sql ?? ??????? ??? ???? INPUTBUFFER DBCC ????? ???:
  • ????? ???? ??????? ???? ???? ?? 255 ?????.
  • ????? ????? ??? ????? ???? ????? ??????? ?????? ?? ????? ????. ??? ???? ??????? ???? ????? ????????? ??????? ????? sp_1 ? sp_2. ?? ???? ????? sp_1 ????????? ????????? ??????? ?????? sp_2 ??????? ??? ?????? ?? ???? ?????? sysprocesses ????? ????? sp_2 ? ????? ?????? fn_get_sql ??????? ??? sp_2. ???????? ??? ???? ???? ?????? fn_get_sql ??????? ?????? ?????? ?? ???? ????? ??????? ??????.
???? ??????? ????? ???????? ?????? ?????? fn_get_sql ???????? ?? ????? ??????? ????????. ??? ????? ????? ????? ???? ????? ????? (SPID) ? ??????? ???? ??????? ?? SQLHANDLE ?? ??? SPID ?? ??????? ???? fn_get_sql ?? ?????? ? ??????? ???????? ????? ????????? ?????? ?? SQL ??????? SPID. ??? ???? ??????:
DECLARE @Handle binary(20)
SELECT @Handle = sql_handle FROM sysprocesses WHERE spid = 52
SELECT * FROM ::fn_get_sql(@Handle) 
				
????? ????? ??????? ?????? fn_get_sql ??????? ?????? ???? ?????. ??? ???? ??????? ????? ???? ???? ???? ???? ????? ?? SQLHANDLE ? ????? ????? ????????? ?? ???? ?????? sysprocesses. ????? ?????? ????? ??????? ???? ?? ?? SQL ?? ???? SQL ????? ???? "?" ????? ?????? fn_get_sql ?????. ??? ?? ?? ?????? ?????? ?????? ?????? sysprocesses ?????? ?????? ?? ???? ??????? ?? ????? ??????? ????? ?? ??????? ???????? ??? SQLHANDLE. ??? ?? ??? ???? ?? ????? ??????? ?????? ?????? ?????? ?? ???????? ?????? fn_get_sql ?????? ??? ???? ????? ?? ????? ??????? ?????? ????? ??.

???? ??????? 2861

????? ???? 2861 ????? SQL Server ???????? ??? ??????? ??? ?? ??????? ?????? ????? SQL Server ?????? ?? (??? ??????????? ????? ????? ?????? ?????? ? ?????? ?????? ? ???????).
  • ??? ?? ????? ????? ???? 2861 ???? ?? ???? ?????? fn_get_sql ?? SQL ??????? ???? ????? ??? ??? ??????? ???. ??? ?? ????? ????? ????? ???? 2861 ?? ???? ?????? fn_get_sql ?? SQL ?????? ?? ??? ??????? ???.
  • ???? ???????? ??? ????? ????? ????? ???? 2861 ??? ????? ??? ???????.

???????

????? ??? ???????? ?? ????? ??????? ?????? ??????? ??? ????? ????? ???? 2861. ???? ???? ???? ????? ???? ????, ??? ??? ????? ???? ?? ??????? ?? ???????? ?? ??? ????? ??????? ?????? ???????.

????? SQL Server 2000 ???????? ????? ????? ?? ?? ??? ??????? ???????? ?? ???? SQL ???????. ??? ???? ????? ??? ?????? ?? ???????? ??????? ?? ????? ??????? ?????? ??????? ??? ?????? ?? ??? ????? ???????? ????? ????????? ????? ?? ???? ????? ? ?? ???? ???? ???? ??? ???? ??????.

????? ?? ???? ?? ????? ??? ??? ????? ???????? ???? ?? ??? ??????? ?????? ??? ??? ??? ??????? ???????. ?? ???? ??? ??????? ???? ??????? ????? ?? ??? ?????? ???? ? ???? ????? ????? lazywriter ????? ???????? ?? ????? ??????? ?????? ???????. ???? ??? ??? ????? ??????? ?????? ??????? ?? ???? ????? ????? ????? ???????? ?? ??? ???????.

??? ???? ?? ????? ??? ??? ????? ???? ?? ??? ????? ???????? ?? ???? ?????? ???? ??? ??? ??? ???????. ????? ?? ??? deallocated ???????? ?? ????? ??????? ?????? ??????? ????? ???????? ??????? ?? ???? ????? ??? ????? ??????? ?????? ??????? ??? ???? ??? ???? ???? ???? ???? ??? ??????.

??? ??? ???? ????? ????? ??? ???? ?????? "? ???? ??????? ???????:
  1. ????? ????? ????? ???? 2861.
  2. ????? ????? FREEPROCCACHE DBCC ?? "???? ???????". ??? ???? ??? ????? ????? SQL Server.

???????

???? ???????: 325607 - ????? ??? ??????: 23/?????/1426 - ??????: 5.3
????? ???
  • Microsoft SQL Server 2000 Standard Edition
????? ??????: 
kbmt kbhotfixserver kbqfe kbsqlserv2000sp3fix kbfix kbinfo kbsqlserv2000presp3fix KB325607 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????325607

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

 

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