Error "Timeout while waiting for buffer 2 error" in SQL Server

A timeout occurred while waiting for a buffer latch of type 2 for the page (1: 1535865), database identifier 6.

This is the error message I received five times while trying to create an index

CREATE NONCLUSTERED  INDEX YearIndx ON dbo.Papers
(   
    PublicationYear
)

The document table is about 20 million records and 175 GB

+3
source share
2 answers

I never came across me, and searches on the big Google did not immediately hit me, so here is what I would like to try:

, SSMS. , "", " ", "". - ?

CREATE NONCLUSTERED  INDEX YearIndx ON dbo.Papers
(   
    PublicationYear
)
WITH 
(
SORT_IN_TEMPDB = ON
--, ONLINE=ON               --Enterprise only
, ALLOW_ROW_LOCKS =  OFF    --default is on
, ALLOW_PAGE_LOCKS =  OFF   --default is on
,  MAXDOP = 1               --all that you can allow
)
  • oh, , , , . , tempdb , db_name (6), , ,

  • - , , . , dbo.Papers. , , , dbo.Papers dbo.Papers_old dbo.Papers_new dbo.Papers.

  • , . , PublicationYear ? , , , , . , , , , .

+3

, , " 4", SQL Server 2008

tempdb, "SORT_IN_TEMPDB = ON", .

SQL Server.

- - 4, bp 00000000FEAFB028, . 12: 312752, stat 0xbc00e09, : 2, : 724228131807060/351413755606409, 0x00000000D2220838: 0, waittime 20700, flags 0x100000001a, 0x0000000D22302808. .

+4

Source: https://habr.com/ru/post/1752453/


All Articles