Rabu , 5 Agustus 2020
New Posts

Reindex Database

< Back
You are here:

CARA MELAKUKAN REINDEX

Pada Halaman Query masukan script dibawah ini:
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR
SELECT table_name FROM information_schema.tables
WHERE table_type = 'base table'
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX(@TableName,' ',95)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor

reindex-01
Eksekusi Query, jika berhasil akan muncul tampilan seperti ini:
reindex-02

Comments are closed.

Scroll To Top