Cov txheej txheem:

Yuav ua li cas kuv shrink ib qho kev hloov pauv hauv SQL Server 2008?
Yuav ua li cas kuv shrink ib qho kev hloov pauv hauv SQL Server 2008?

Video: Yuav ua li cas kuv shrink ib qho kev hloov pauv hauv SQL Server 2008?

Video: Yuav ua li cas kuv shrink ib qho kev hloov pauv hauv SQL Server 2008?
Video: Data Science with Python! Analyzing File Types from Avro to Stata 2024, Kaum ib hlis
Anonim

Txhawm rau txo lub cav hauv SSMS, txoj nyem rau ntawm lub database, xaiv Tasks, Shrink, Files:

  1. Kev tshaj tawm.
  2. Nyob ntawm Txo Cov ntaub ntawv qhov rais, hloov cov ntaub ntawv rau Log .
  3. Txo tus log siv TSQL .
  4. DBCC SHRINKFILE (AdventureWorks2012_log, 1)

Raws li kev sib raug zoo, kuv yuav ua li cas kom txo tau qhov kev hloov pauv?

Txhawm rau txo cov ntaub ntawv lossis cov ntaub ntawv teev cia siv SQL Management Studio:

  1. Hauv Object Explorer, txuas mus rau ib qho piv txwv ntawm SQL Server Database Cav thiab tom qab ntawd nthuav qhov piv txwv ntawd.
  2. Expand Databases thiab ces right-click lub database uas koj xav kom shrink.
  3. Point to Tasks, taw tes rau Shrink, thiab tom qab ntawd nyem Cov Ntaub Ntawv.

Qhov thib ob, yuav ua li cas koj kho qhov kev hloov pauv rau cov ntaub ntawv tag nrho? Thaum lub cov ntaub ntawv sib pauv yog puv , koj yuav tsum txo qhov loj ntawm lub cov ntaub ntawv sib pauv . Txhawm rau ua qhov no, koj yuav tsum tau txiav tawm qhov tsis ua haujlwm kev lag luam hauv koj kev lag luam log , thiab ces shrink lub kev lag luam log ntaub ntawv. Thaum lub cov ntaub ntawv sib pauv yog puv , tam sim ntawd thaub qab koj kev lag luam log ntaub ntawv.

Kuj Paub, yuav ua li cas kuv shrink ib daim ntawv teev lus hauv SQL Server 2008?

Qhib Sql Management Studio. Right click lub database , Tasks > Txo > Cov ntaub ntawv . Hauv qab Cov ntaub ntawv Ntaus, xaiv lub log ntaub ntawv . Nco ntsoov kos kev xaiv Tso qhov chaw tsis siv raws li qhov ntsws ua, nyem OK.

Yuav ua li cas kuv shrink SQL yuam kev cav?

Qhib koj daim ntawv theej ntawm SSMS thiab:

  1. Nias lub "Kev Tswj" nplaub tshev.
  2. Txoj nyem rau ntawm "SQL Server Logs"
  3. Xaiv "Configure"
  4. Kos lub thawv "Txheej txheem cov ntaub ntawv yuam kev ua ntej lawv rov siv dua"
  5. Xaiv qee tus nqi los muab tso rau hauv lub thawv "Ntau kawg ntawm kev ua yuam kev tsis ua tiav" lub thawv.
  6. Nyem "OK"

Pom zoo: