Monday, November 14, 2011

Pengembalian database karena suspect


jalankan query analyzer dan excecute perintah berikut:

use master go sp_configure 'allow updates', 1 reconfigure with override go

select status from sysdatabases where name = 'your database name'

update sysdatabases set status= 32768 where name = 'your database name'

restart sql server

dbcc rebuild_log ('your database name', 'full path to a new transaction log file')

use 'your database name' go sp_dboption 'your database name', 'single_user', 'true' go dbcc
checkdb ('your database name', repair_allow_data_loss) go

update sysdatabases set status= 0 where name = 'your database name'

DBCC CHECKALLOC ('your database name')

DBCC CHECKDB ('your database name')

sp_dboption 'your database name', 'single_user', 'false' go use master go sp_configure 'allow updates', 0 go

use master go exec sp_resetstatus your_database_name
restart database name

jalankan DBCC NEWALLOC, DBCC TEXTALL and DBCC CHECKDB.

catatan: setiap menjalankan sp_* lalu restart untuk memperlihatkan effectnya

0 comments:

Post a Comment

sabar ya, komentar anda akan kami moderasi terlebih dahulu. laporkan kepada kami apabila ada post yang masih berbentuk kiri ke kanan. nuhun