Kuv yuav tso qhov chaw nyob ntawm TempDB li cas?
Kuv yuav tso qhov chaw nyob ntawm TempDB li cas?

Video: Kuv yuav tso qhov chaw nyob ntawm TempDB li cas?

Video: Kuv yuav tso qhov chaw nyob ntawm TempDB li cas?
Video: Kuv Pehawm Koj (I enter the Holy of Holies) 2024, Kaum ib hlis
Anonim

Siv tus DBCC SHRINKDATABASE hais kom txo qis lub tempdb database. DBCC SHRINKDATABASE tau txais tus parameter target_percent. Qhov no yog tus xav tau feem pua qhov chaw dawb sab laug hauv tus database file tom qab tus database yog shrunk. Yog tias koj siv DBCC SHRINKDATABASE, koj yuav tau rov pib SQL Server.

Tib neeg kuj nug, yuav ua li cas yog tempdb puv?

Tsis muaj dab tsi ua tsis tau TEMPDB . Yog nws loj hlob dhau lawm, nws yuav muaj kev cuam tshuam los ntawm cov seem ntawm cov ntaub ntawv, suav nrog ua rau lawv siv tsis tau ib ntus. Kev daws teeb meem yog ib txwm nres thiab pib SQL Server cov kev pabcuam. Qhov ntawd ua rau TEMPDB rov tsim kho ntawm nws qhov loj me.

Tsis tas li ntawd, vim li cas tempdb puv? Tempdb puv - Ib qho xwm txheej zoo sib xws Qhov no yuav xaus rau hauv qhov chaw disk ceeb toom thiab yuav ua rau muaj teeb meem server. Thaum muaj ntau tus SQL Server database cov thawj coj 'pom tias nws nyuaj heev rau shrink lub tempd ib , lawv tam sim xaiv rau server restart. Yog li, koj qhov chaw disk ceeb toom yuav nres thiab cov teeb meem server kuj yuav nres.

Tsuas yog li ntawd, dab tsi yog siv qhov chaw tempdb?

Tempdb yog siv los tuav: Cov khoom siv ib ntus uas tau tsim tshwj xeeb, xws li: thoob ntiaj teb lossis hauv zos cov lus ib ntus thiab cov ntawv ntsuas, cov txheej txheem khaws cia ib ntus, cov lus hloov pauv, Cov lus xa rov qab rau hauv cov lus muaj nuj nqis, lossis tus cursors. Cov khoom sab hauv uas yog tsim los ntawm lub cav database.

Puas tempdb shrink cia li?

Yog, SQL Server cov ntaub ntawv ua tsis yog shrink cia li . Lawv nyob twj ywm qhov loj me tshwj tsis yog koj qhia meej ntsws lawv, los ntawm SQL Server Management Studio lossis los ntawm kev siv DBCC SHRINKFILE hais kom ua. Koj tuaj yeem teeb tsa qhov ntawd hauv cov ntaub ntawv ntu ntawm cov khoom siv hauv cov ntaub ntawv, lossis nrog ALTER DATABASE hais kom ua.

Pom zoo: