Today, when writing a stored procedure discovery execution in the development process, 605 errors are occasionally prompted, and re-execution may succeed.
Baidu a bit, many of the argument is the hardware IO problem, is the memory feedback to the SQL SERVER write success, but the next time the Read Sqlsever system check found that the data written is incorrect.
Change a server, or prompt the same error, is the two servers have a hardware problem?
Re-trace the error and examine the code carefully. Find always in the same place prompt error
INSERT into#STK_MKT (List_date,ltttrdate,edate,psvpclngprarc,psvopngprarc,psvclngprarc,psvhtpr,psvltpr,trvol,trto) SELECTc.list_date,b.edate,a.enddate,b.psvpclngprarc,b.psvopngprarc,b.psvclngprarc,b.psvhtpr,b.psvltpr,b.trvol,b. Trto from#TRADE_DAY A CrossAPPLY (SELECT TOP 1 * from#STK_MKTWHEREEDATE<=A.enddate andList_date<=a.enddateORDER byEDATEDESC) B CrossAPPLY (SELECT TOP 1 * from#LIST_DATEWHEREList_date<=A.enddateORDER byList_dateDESC) CWHERE not EXISTS(SELECT 1 from#STK_MKTWHEREEDATE=A.enddate)
Change the name of the inserted table and save the result in a different table
INSERT into #HK_STK_PRICE_IDX (LIST_DATE,LTTTRDATE,EDATE,PSVPCLNGPRARC,PSVOPNGPRARC,PSVCLNGPRARC,PSVHTPR, Psvltpr,trvol,trto)SELECTc.list_date,b.edate,a.enddate,b.psvpclngprarc,b.psvopngprarc,b.psvclngprarc,b.psvhtpr,b.psvltpr,b.trvol,b. Trto from#TRADE_DAY A CrossAPPLY (SELECT TOP 1 * from#STK_MKTWHEREEDATE<=A.enddate andList_date<=a.enddateORDER byEDATEDESC) B CrossAPPLY (SELECT TOP 1 * from#LIST_DATEWHEREList_date<=A.enddateORDER byList_dateDESC) CWHERE not EXISTS(SELECT 1 from#STK_MKTWHEREEDATE=A.enddate)
The re-execution did not report the error again. The reason is not clear, not easy to guess.
SQL Server 605 attempted to extract a logical page in database%d%s_pgid failed. This logical page belongs to the allocation unit%i64d, not%i64d.