FIX: ???? ??????? DML ????????? ???? ?? ????? ??? recompiles ??? ??????? ??????? ???? ?????

?????? ????????? ?????? ?????????
???? ???????: 870972 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???: 470083 (SQL Server 8.0)
????? ???? | ?? ????

?? ??? ??????

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

??????

???? ??? ??????? ??????? ??? ??? ??????? ??? ??????? ??????:
  • ???????? ???? ??? ??????? ?? ???? ???? ????????? ??????? ???.
  • ????????? ??????? ?????? ???? ????????? ???????.
  • ?? ??? ??? ??? ????? ????? ????????? ??? ????? ???? ????????? ???????.
  • ?? ??? ??? ??? ??????? ???? ????????? ??????? ????? ????????? ??????.
  • ?? ??? ??? ??? ????? ??? ??????? ???????.
  • ??????? ??????? ?? ???? ????????? ???????.

???????

??? ????? ????? ??? (DML) ??????? ?????? ??? UPDATE INSERT ?? DELETE ????? ????????? ???? ? recompiles ?????? Microsoft SQL Server ???? ????? ?????? ?????? ???? ????? ??????. ??? ???? ?? recompilation ???????? ??? ??????? ??????? ????? ???? ????? ??????.

?? ???? recompilation ???????? ??? ??????? ?????? ??? ?????? ???????:
  • ????? ??????? DML ??? ????.
  • ????? ??? ?????? ???? ????? ????? DML ?? ??? ??? ???? ????? ??????? DML.
?????? ??? ????? ????????? ??????? ??????? ???? ??? "Microsoft SQL Server 2000 ??????? ??????? ????? ?????? Service Pack 3 ?? Microsoft SQL Server 2000 ??????? ??????? ????? ?????? ???? a? ?????????" ?? ????? "????? ????? Microsoft" ???????:
290211????? ?????? ??? ???? ???? ???? ?? SQL Server 2000

????

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

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ?? Microsoft SQL Server 2000. ????? ?? ?????????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
290211????? ?????? ??? ???? ???? ???? ?? SQL Server 2000

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

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

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

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

??? ???? ??? ????? ????? ???? ????????? ??? ????? ??? ??????? ??????.

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

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

????? ??? ??????? ?????? ??? ??????? ???????? ?????? ???????? ???? ???? ??? ??????? ???. ?? ?? ????? ??? ??????? ?????? ??? ???? ??????? ???? ??? ?? ???? ???? ?????? ???? ????? ?????? ????? ????.

????? ????? ????? ?????????? ?? ??? ??????? ?????? ???? ????? (?? ???? ????) ??????? ?? ?????? ??????. ??? ??? ???????? ???????? ?????? ???? ??????? ???????? ??????? coordinated (UTC). ????? ???? ???? ??????? ?????? ??? ??????? ??? ??????? ??????. ?????? ????? ??? ??????? ??????? (UTC) ???????? ??????? ?????? ????? ??????? ??????? ??????? ?? ???? ??????? ?????? ?? "???? ??????".
    Date         Time   Version       Size       File name
   ------------------------------------------------------------------
   18-Jun-2004  14:14  2000.80.954.0    664,128  Autoplt.dll      
   18-Jun-2004  14:14  2000.80.954.0     78,400  Console.exe      
   18-Jun-2004  14:14  2000.80.954.0    315,968  Custtask.dll     
   18-Jun-2004  14:14  2000.80.954.0     33,340  Dbmslpcn.dll     
   08-Apr-2004  09:12                   786,432  Distmdl.ldf
   08-Apr-2004  09:12                 2,359,296  Distmdl.mdf
   10-Oct-2003  06:18                       180  Drop_repl_hotfix.sql
   18-Jun-2004  14:14  2000.80.954.0  1,905,216  Dtspkg.dll       
   18-Jun-2004  14:14  2000.80.954.0    528,960  Dtspump.dll      
   18-Jun-2004  14:14  2000.80.954.0  1,557,052  Dtsui.dll        
   18-Jun-2004  14:14  2000.80.954.0    639,552  Dtswiz.dll       
   10-Oct-2003  06:18                   747,927  Instdist.sql
   10-Oct-2003  06:18                     1,581  Inst_repl_hotfix.sql
   18-Jun-2004  14:14  2000.80.954.0    352,828  Isqlw.exe        
   18-Jun-2004  14:14  2000.80.954.0     82,492  Itwiz.exe        
   18-Jun-2004  14:14  2000.80.954.0     90,692  Msgprox.dll      
   19-May-2004  11:13  8.11.40209.0     209,408  Mssdi98.dll      
   18-Jun-2004  14:14  2000.80.954.0     62,024  Odsole70.dll     
   18-Jun-2004  14:15  2000.80.954.0     25,144  Opends60.dll     
   18-Jun-2004  14:14  2000.80.954.0     57,904  Osql.exe         
   18-Jun-2004  14:14  2000.80.954.0    279,104  Pfutil80.dll     
   10-Oct-2003  06:07                   550,780  Procsyst.sql
   08-Apr-2004  09:12                    12,305  Qfe469315.sql
   08-Apr-2004  09:12                    19,195  Qfe469571.sql
   17-Jun-2004  02:42                 1,105,167  Replmerg.sql
   18-Jun-2004  14:14  2000.80.954.0    221,768  Replprov.dll     
   18-Jun-2004  14:14  2000.80.954.0    307,784  Replrec.dll      
   16-Jun-2004  14:07  2000.80.954.0    159,813  Replres.rll
   10-Oct-2003  06:18                 1,087,150  Replsys.sql
   10-Oct-2003  06:18                   986,603  Repltran.sql
   18-Jun-2004  14:14  2000.80.954.0    287,304  Rinitcom.dll     
   18-Jun-2004  14:14  2000.80.954.0     78,416  Sdiclnt.dll      
   18-Jun-2004  14:14  2000.80.954.0     66,112  Semmap.dll       
   18-Jun-2004  14:14  2000.80.954.0     57,916  Semnt.dll        
   18-Jun-2004  14:14  2000.80.954.0    492,096  Semobj.dll       
   16-Jun-2004  14:44  2000.80.954.0    172,032  Semobj.rll
   18-Jun-2004  14:14  2000.80.954.0     53,832  Snapshot.exe     
   11-Mar-2004  14:40                   117,834  Sp3_serv_uni.sql
   18-Jun-2004  14:13  2000.80.954.0     28,672  Sqlagent.dll     
   18-Jun-2004  14:14  2000.80.954.0    311,872  Sqlagent.exe     
   18-Jun-2004  14:13  2000.80.954.0    168,001  Sqlakw32.dll     
   18-Jun-2004  14:14  2000.80.954.0     33,344  Sqlctr80.dll     
   18-Jun-2004  14:14  2000.80.954.0  4,215,360  Sqldmo.dll       
   18-Jun-2004  14:14                    25,172  Sqldumper.exe    
   16-Jun-2004  13:54  2000.80.954.0     28,672  Sqlevn70.rll
   18-Jun-2004  14:14  2000.80.954.0    180,792  Sqlmap70.dll     
   18-Jun-2004  14:14  2000.80.954.0    188,992  Sqlmmc.dll       
   16-Jun-2004  14:52  2000.80.954.0    479,232  Sqlmmc.rll
   18-Jun-2004  14:14  2000.80.954.0    401,984  Sqlqry.dll       
   18-Jun-2004  14:14  2000.80.954.0     57,920  Sqlrepss.dll     
   18-Jun-2004  14:14  2000.80.954.0  7,581,777  Sqlservr.exe     
   18-Jun-2004  14:14  2000.80.954.0    590,396  Sqlsort.dll      
   18-Jun-2004  14:14  2000.80.954.0     45,644  Sqlvdi.dll       
   18-Jun-2004  14:14  2000.80.954.0    106,588  Sqsrvres.dll     
   18-Jun-2004  14:14  2000.80.954.0     33,340  Ssmslpcn.dll     
   18-Jun-2004  14:14  2000.80.954.0     82,492  Ssnetlib.dll     
   18-Jun-2004  14:14  2000.80.954.0     25,148  Ssnmpn70.dll     
   18-Jun-2004  14:14  2000.80.954.0    123,456  Stardds.dll      
   18-Jun-2004  14:14  2000.80.954.0    158,240  Svrnetcn.dll     
   18-Jun-2004  14:14  2000.80.954.0     76,416  Svrnetcn.exe     
   18-Jun-2004  14:14  2000.80.954.0     49,228  Ums.dll          
   18-Jun-2004  14:14  2000.80.954.0     98,872  Xpweb70.dll      

?????? ???? ?????? ?????? ??????? ?????? ?????? ???? ????? ??? ??? ??????? ?? ????? ????? ??? ????? ??????.

?????

???? Microsoft ?? ??? ??? ?? Microsoft ???????? ??????? ?? ??? "????? ???".

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

??????? ????

???? ??? ??????? ??????? ?????? ??? ????? ????? recompiled ??? ??????? ?? ????. ?????? ??? ????? ????? ????? ??????? ? ??? ????? ?????? SQL Server ????? 9055 ??? ????? ??? ??????? ??????. ????? ???? ??????? 9055 ???? SQL Server ? ?????? ???? ????? ???????:
  • ????? ??????? SQL ???????? ??????? ?? ??????? SQL ???? ??? ???? SQL Server:
    DBCC TRACEON (9055, -1)
  • ????? -T9055 ??? ?????? ??? ??????? SQL Server.

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

????? ????? ??????? ???? recompilation ??? "????? ????" ? ???? ??????? ???????:
  1. ??? ????? "???? ??????? SQL ?? ?? ?????? ??? ???? SQL Server 2000.
  2. ????? ???? ????? ????? ??? ??????. ??? ?????? ??? cache_test ??????? ??????? ?? cache_test_update ????????. ?????? ????? ?? ?????? ?????? SQL ???????? ???????:
    use pubs
    go
    set nocount on
    go
    if exists (select 1 from sysobjects where id = object_id('dbo.cache_test'))
    drop table dbo.cache_test
    go
    create table dbo.cache_test
    (
    id int not null,
    descr varchar(30) not null,
    rowcreateddt datetime not null default getdate(),
    rowcreatedby varchar(30) not null default right(system_user,30),
    testcolumn varchar(30) null,
    primary key (id)
    )
    go
    
    create trigger dbo.cache_test_update
    on dbo.cache_test
    for update
    as
    if exists ( select 1 from inserted where id = 98654 )
    print 'test'
    return
    go
  3. ????? ??? ??????? ?? ?????? cache_test ?? ?? ?????? ???? ??????? ?? ????? ??????? ?????? ???????. To do this, run the following Transact-SQL statements:
    insert into cache_test (id, descr, testcolumn) select 1,'Descr 1','Test 1'
    insert into cache_test (id, descr, testcolumn) select 2,'Descr 2','Test 2'
    insert into cache_test (id, descr, testcolumn) select 3,'Descr 3','Test 3'
    insert into cache_test (id, descr, testcolumn) select 4,'Descr 4','Test 4'
    insert into cache_test (id, descr, testcolumn) select 5,'Descr 5','Test 5'
    insert into cache_test (id, descr, testcolumn) select 6,'Descr 6','Test 6'
    insert into cache_test (id, descr, testcolumn) select 7,'Descr 7','Test 7'
    insert into cache_test (id, descr, testcolumn) select 8,'Descr 8','Test 8'
    insert into cache_test (id, descr, testcolumn) select 9,'Descr 9','Test 9'
    insert into cache_test (id, descr, testcolumn) select 10,'Descr 10','Test 10'
    go
    
    dbcc freeproccache
  4. ????? ?? ???? ?? ???? cache_test ?? ?? ??????? ????? ???? ??????? ?? ???? ?? ????? ??????? ??????. ?????? ????? ?? ?????? ?????? SQL ???????? ???????: ????? cache_test ???????
    update cache_test
    set testcolumn = 'testing '+cast(id as varchar)
    where id between 1 and 1
    go
    
    select SetOpts,UseCounts,* from master..SyscacheObjects where ObjId=Object_ID('cache_test_update') order by SetOpts, CacheObjType
    go
    ??? ????? ????? ????? ??? ???:
    SetOpts UseCounts bucketid cacheobjtype     objtype  objid      dbid dbidexec uid refcounts usecounts pagesused lasttime maxexectime avgexectime lastreads lastwrites setopts langid dateformat status sqlbytes sql
    5371	1	  10394	   Compiled Plan    Trigger  1029578706	5    5	      1	  2	    1	      1	        0	 0	     0	         0	   0	      5371    0	     1	        0	34	cache_test_update
    5371	1	  10394	   Executable Plan  Trigger  1029578706	5    5	      1	  1	    1	      1	        0	 0	     0	         0	   0	      5371    0	     1	        0	34	cache_test_update
    
  5. ????? ????? ???? ?? ???? cache_test ?? ?? ??????? ??? ????? ??? ???? ?????? ?? ????? ??????? ??????. ?????? ????? ?? ?????? ?????? SQL ???????? ???????: ????? cache_test ???????
    update cache_test
    set testcolumn = 'testing '+cast(id as varchar)
    where id between 1 and 4
    go
    
    select SetOpts,UseCounts,* from master..SyscacheObjects where ObjId=Object_ID('cache_test_update') order by SetOpts, CacheObjType
    go
    ??? ??? ????? ????? ????? ??? ???:
    SetOpts UseCounts bucketid cacheobjtype     objtype  objid      dbid dbidexec uid refcounts usecounts pagesused lasttime maxexectime avgexectime lastreads lastwrites setopts langid dateformat status sqlbytes sql
    4347	1	  10394	   Compiled Plan    Trigger  1029578706	5    5	      1	  2	    1	      1	        0	 0	     0	         0	   0	      4347    0	     1	        0	34	cache_test_update
    4347	1	  10394	   Executable Plan  Trigger  1029578706	5    5	      1	  1	    1	      1	        0	 0	     0	         0	   0	      4347    0	     1	        0	34	cache_test_update
    5371	1	  10394	   Compiled Plan    Trigger  1029578706	5    5	      1	  2	    1	      1	        0	 0	     0	         0	   0	      5371    0	     1	        0	34	cache_test_update
    5371	1	  10394	   Executable Plan  Trigger  1029578706	5    5	      1	  1	    1	      1 	0	 0	     0	         0	   0	      5371    0	     1	        0	34	cache_test_update
    
  6. ????? ???? ????) ?? ?????? cache_test ? ???? ?? ????? ???? ??????? ???? ?????? ??? ?? ????? ??????? ??????. ?????? ????? ?? ?????? ?????? SQL ???????? ???????: ????? cache_test ???????
    update cache_test
    set testcolumn = 'testing '+cast(id as varchar)
    where id between 1 and 5
    go
    
    select SetOpts,UseCounts,* from master..SyscacheObjects where ObjId=Object_ID('cache_test_update') order by SetOpts, CacheObjType
    go
    
    ??? ????? ????? ????? ??? ???:
    SetOpts UseCounts bucketid cacheobjtype     objtype  objid      dbid dbidexec uid refcounts usecounts pagesused lasttime maxexectime avgexectime lastreads lastwrites setopts langid dateformat status sqlbytes sql
    4347	1	  10394	   Compiled Plan    Trigger  1029578706	5    5	      1	  2	    1	      1	        0	 0	     0	         0	   0	      4347    0	     1	        0	34	cache_test_update
    4347	2	  10394	   Executable Plan  Trigger  1029578706	5    5	      1	  1	    2	      1	        0	 0	     0	         0	   0	      4347    0	     1	        0	34	cache_test_update
    

    ??? ????? ??? ??????? ?? ??????? ?? ?????? 5? ?? ????? ?????? ??????? ???? ?? ???? ??? ?????? ?? ?????? ??????? ???????:
    • ??? ??? ??? ??????? ???? ?????? ?? ????? ?? ?????? ?? ????? ?????? 5. ???? ??? ?????? ???? recompiled ??? ??????? ???? ?????? ?? ????? ?? ?????? ?????? ??? ????? ?????.
    • ??? ????? ?? ?? ???? ????? ??????? ?? recompiled ? ???? ?????? usecounts ??? ??? ?? ??????? "???? ???? ???????" ?????. ??? ??????.
    • ???????? ??? ???? ?? ??? ??? ??????? ???? ?????? ?? ????? ?? ???? ?? ????? ??????? ??????.

?????

????? ?? ?????????? ?? ?????? ???? ?????? Microsoft Network (MSDN) ?????? ??? ?????:
http://msdn2.microsoft.com/en-us/library/aa175244(SQL.80).aspx
?????? ??? ??????? ?????? ??? ???? ??????? ???????? Microsoft SQL Server ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
822499???? ????? ????? ??? ??????? ????? Microsoft SQL Server
?????? ??? ??????? ?????? ??? ????????? ???? ???????? Microsoft ??? ????? ??????? ??? ???????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
824684??? ????????? ???????? ????????? ?? ??? ??????? ????? Microsoft
?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
263889????? ??? SQL ????? [[???????]]

???????

???? ???????: 870972 - ????? ??? ??????: 21/????/1428 - ??????: 2.4
????? ???
  • Microsoft SQL Server 2000 Developer Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2000 Enterprise Edition
  • Microsoft SQL Server 2000 Personal Edition
  • Microsoft SQL Server 2000 Workgroup Edition
  • Microsoft SQL Server 2000 Desktop Engine (Windows)
  • Microsoft SQL Server 2000 Enterprise Edition 64-bit
????? ??????: 
kbmt kbtrigger kbbug kbfix kbsqlserv2000presp4fix kbhotfixserver kbqfe KB870972 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????870972

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

 

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