Thaum koj siv Microsoft SQL Server txhawm rau txuas lossis nkag mus rau MDF cov ntaub ntawv khaws tseg tsis raug, koj yuav pom ntau yam lus yuam kev, uas yuav yog qhov nkag siab tsis meej rau koj. Yog li ntawd, ntawm no peb yuav sim los sau tag nrho cov uas ua tau yuam kev, txheeb raws li lawv ua ntau zaus. Rau txhua qhov yuam kev, peb yuav piav qhia nws cov tsos mob, piav qhia nws qhov tseeb vim li cas thiab muab cov ntaub ntawv piv txwv nrog rau cov ntawv tas los ntawm peb DataNumen SQL Recovery, kom koj tuaj yeem nkag siab lawv zoo dua. Hauv qab no peb yuav siv 'xxx.MDF' los tshaj tawm koj lub siab tsis ncaj SQL Server MDF cov ntaub ntawv npe npe.
raws li SQL Server lossis CHECKDB cov lus yuam kev, muaj peb yam kev ua yuam kev uas yuav ua rau tsis ua haujlwm:

    1. Hloov uas tsis: Peb paub cov ntaub ntawv hauv MDF & NDF cov ntaub ntawv tau muab faib ua nplooj ntawvCov. Thiab nws muaj qee cov nplooj ntawv tshwj xeeb uas siv rau kev tswj hwm faib, raws li hauv qab no:
Nplooj Ntawv Hom Hauj lwm
GAM Nplooj Khaws daim ntawv qhia chaw thoob ntiaj teb (GAM) cov ntaub ntawv.
SGAM Nplooj Muab khaws cia sib qhia daim ntawv qhia chaw ntiaj teb (SGAM) cov ntaub ntawv.
IAM Nplooj Khaws cov ntawv qhia cov cim ntsuas (IAM) cov ntaub ntawv.
PFS Nplooj Ntawv Muab cov ntaub ntawv PFS faib rau cov ntaub ntawv.

Yog tias ib qho ntawm cov nplooj ntawv saum toj saud muaj qhov yuam kev, lossis cov ntaub ntawv raug tswj los ntawm nplooj ntawv faib cov khoom tsis sib thooj nrog cov ntaub ntawv faib tawm, tom qab ntawd SQL Server lossis CHECKDB yuav tshaj qhia faib tsis raug.

  • Tsis sib xws kom raug: rau nplooj ntawv uas yog siv los khaws cov ntaub ntawv, suav nrog cov nplooj ntawv cov ntaub ntawv thiab nplooj ntawv ntsuas ntsiab lus, yog tias SQL Server lossis CHECKDB pom qhov tsis raug ntawm nplooj ntawv nplooj thiab tus tshev, ces lawv mam tshaj qhia sib xws uas tsis.
  • Tag nrho lwm yam yuam kev: Tej zaum yuav muaj lwm yam yuam kev tsis poob rau hauv ob nqe lus saum toj no.

 

SQL Server muaj cov twj txhim kho hu ua DBCC, uas muaj CHECKDB thiab SAIB TAU cov kev xaiv uas tuaj yeem pab kho kho MDF cov ntaub ntawv tsis muaj zog. Txawm li cas los xij, rau MDB cov ntaub ntawv khaws tseg tsis zoo, DBCC CHECKDB thiab SAIB TAU kuj yuav swb thiab.

Qhia qhov tseeb yuam kev los ntawm CHECKDB:

Allocation uas tsis qhia los ntawm CHECKDB:

Txhua yam kev txhaum uas hais los ntawm CHECKDB: