Letšoao:

Ha o sebelisa TLHOKOMELISO DBCC le LOKISETSA_ALLOW_DATA_LOSS paramethara ho lokisa database e senyehileng ea .MDF, e kang ena:

DBCC CHECKDB (xxxx, 'REPAIR_ALLOW_DATA_LOSS')

u bona molaetsa o latelang oa phoso:

Liphetho tsa DBCC tsa 'xxxx'.
CHECKDB e fumane liphoso tsa kabo tse 0 le liphoso tse sa fetoheng tsa 0 ho database 'xxxx'.
Msg 824, Level 24, State 2, Line 8
SQL Server e fumane phoso e hlakileng ea I / O e thehiloeng ho ts'ebetsong: checksum e fosahetseng (e lebelletsoeng: 0xea8a9a2f; ea sebele: 0x37adbff8). E etsahetse nakong ea ha ho baloa leqephe (1:28) ho database ea ID 39 ho 0x00000000038000 ho file 'xxxx.mdf'. Melaetsa e meng ho SQL Server log ea phoso kapa log ea ketsahalo ea sistimi e ka fana ka lintlha tse ling hape. Ena ke phoso e matla e sokelang seriti sa database mme e tlameha ho lokisoa hanghang. Tlatsa tlhahlobo e felletseng ea database (DBCC CHECKDB). Phoso ena e ka bakoa ke lintlha tse ngata; bakeng sa tlhaiso-leseling e batsi, bona SQL Server Libuka Inthaneteng.

moo 'xxxx.mdf' e leng lebitso la file e senyehileng ea MDF e ntseng e lokisoa. Le ha CHECKDB e rialo

CHECKDB e fumane liphoso tsa kabo tse 0 le liphoso tse sa fetoheng tsa 0 ho database 'xxxx'.

Hona e ntse e le phoso e lumellanang (Msg 824) ho database.

Screenshot ea molaetsa oa phoso:

Phoso e utloahalang ea I / O e thehiloeng ho ts'ebetsong: checksum e fosahetseng

Haeba bobolu bo le bobe, ho tla ba le melaetsa ea phoso e tsoelang pele (Msg 824), joalo ka tlase:

Msg 824, Level 24, State 6, Line 2 SQL Server e fumane phoso e hlakileng ea I / O e thehiloeng ho ts'ebetsong: checksum e fosahetseng (e lebelletsoeng: 0x3d17dfef; ea sebele: 0xd81748ef). E etsahetse nakong ea ha ho baloa leqephe (1: 0) ho database ID 39 ha ho koaloa 0000000000000000 ho file 'xxxx.mdf'. Melaetsa e meng ho SQL Server log ea phoso kapa log ea ketsahalo ea sistimi e ka fana ka lintlha tse ling hape. Ena ke phoso e matla e sokelang seriti sa database mme e tlameha ho lokisoa hanghang. Tlatsa tlhahlobo e felletseng ea database (DBCC CHECKDB). Phoso ena e ka bakoa ke lintlha tse ngata; bakeng sa tlhaiso-leseling e batsi, bona SQL Server Libuka Inthaneteng.

Msg 824, Level 24, State 6, Line 4 SQL Server e fumane phoso e hlakileng ea I / O e thehiloeng ho ts'ebetsong: checksum e fosahetseng (e lebelletsoeng: 0x3d17dfef; ea sebele: 0xd81748ef). E etsahetse nakong ea ha ho baloa leqephe (1: 0) ho database ID 39 ha ho koaloa 0000000000000000 ho file 'xxxx.mdf'. Melaetsa e meng ho SQL Server log ea phoso kapa log ea ketsahalo ea sistimi e ka fana ka lintlha tse ling hape. Ena ke phoso e matla e sokelang seriti sa database mme e tlameha ho lokisoa hanghang. Tlatsa tlhahlobo e felletseng ea database (DBCC CHECKDB). Phoso ena e ka bakoa ke lintlha tse ngata; bakeng sa tlhaiso-leseling e batsi, bona SQL Server Libuka Inthaneteng.

moo 'xxxx.mdf' e leng lebitso la file e senyehileng ea MDF e ntseng e lokisoa.

Screenshot ea molaetsa oa phoso:

Haeba bobolu bo bobe haholo, o ka bona Msg 7909 e latela Msg 824:

Liphetho tsa DBCC tsa 'xxxx'.
CHECKDB e fumane liphoso tsa kabo tse 0 le liphoso tse sa fetoheng tsa 0 ho database 'xxxx'.
Msg 824, Level 24, State 2, Line 8
SQL Server e fumane phoso e hlakileng ea I / O e thehiloeng ho ts'ebetsong: checksum e fosahetseng (e lebelletsoeng: 0xcfcd2118; ea sebele: 0x6fc599d6). E etsahetse nakong ea ha ho baloa leqephe (1: 1) ho database ea ID 39 ho 0x00000000002000 ho file 'xxxx.mdf'. Melaetsa e meng ho SQL Server log ea phoso kapa log ea ketsahalo ea sistimi e ka fana ka lintlha tse ling hape. Ena ke phoso e matla e sokelang seriti sa database mme e tlameha ho lokisoa hanghang. Tlatsa tlhahlobo e felletseng ea database (DBCC CHECKDB). Phoso ena e ka bakoa ke lintlha tse ngata; bakeng sa tlhaiso-leseling e batsi, bona SQL Server Libuka Inthaneteng.
Msg 7909, Level 20, State 1, Line 8
Ho lokisa maemo a maemo a tšohanyetso ho hlotsoe. U tlameha ho khutlisa ho tsoa bekapo.

moo 'xxxx' ke lebitso la database mme 'xxxx.mdf' ke lebitso la faele ea database.

Hlokomela Msg 7909 ke phoso e matla e ka hlahang maemong a mangata neng kapa neng SQL Server nahana hore database ha e na ho hlaphoheloa.

Screenshot ea molaetsa oa phoso:

sekheo

Tlhaloso e hlakileng:

Lintlha tse faeleng ea MDF li bolokiloe e le 8KB maqepheng. Leqephe ka leng le na le tšimo ea checksum ea boikhethelo.

Haeba taelo ea DBCC CHECKDB e fumana litekanyetso tsa checksum leqepheng la hlooho, leqephe la PFS le maqephe a mang a data ha a na thuso mme e ke ke ea lokisa bothata, e tla tlaleha phoso ena (Msg 824). Haeba corruptton e le matla, ho ka ba le li-erros tse tsoelang pele (Msg 824) kapa e lateloa ke phoso e ngoe (Msg 7909).

U ka sebelisa sehlahisoa sa rona DataNumen SQL Recovery ho khutlisa data ho tsoa faeleng e senyehileng ea MDF le ho rarolla phoso ena.

Sampula Files:

Mohlala oa lifaele tsa MDF tse senyehileng tse tla baka phoso (Phoso e le 'ngoe ea Msg 824):

SQL Server tlhahiso Faele ea MDF e senyehileng Faele ea MDF e hlophisitsoeng ke DataNumen SQL Recovery
SQL Server 2014 Phoso1_3.mdf Phoso1_3_fixed.mdf

Mohlala oa lifaele tsa MDF tse senyehileng tse tla baka phoso (Tsoela pele Msg 824 liphoso):

SQL Server tlhahiso Faele ea MDF e senyehileng Faele ea MDF e hlophisitsoeng ke DataNumen SQL Recovery
SQL Server 2014 Phoso1_1.mdf Phoso1_1tsepamisitsoeng.mdf

Mohlala oa lifaele tsa MDF tse senyehileng tse tla baka phoso (Phoso ea Msg 824 e lateloa ke phoso ea Msg 7909):

SQL Server tlhahiso Faele ea MDF e senyehileng Faele ea MDF e hlophisitsoeng ke DataNumen SQL Recovery
SQL Server 2014 Phoso1_2.mdf Phoso1_2_fixed.mdf

 

References:

1. https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-824-database-engine-error?view=sql-server-ver15