Wednesday, August 29, 2012

"tail -f" with highlight


tail maillog -f | grep -E ": 550|: 554" | perl -p -e "s/(550|554)/\e[1;46;1m$&\e[0m/g;"


0all attributes off
1bold
32foreground green
40background black
Colors
This vector holds the colors used for SGR control sequences parameters 30 to 37 \(foreground colors) and 40 to 47 (background colors).
ParameterColor
3040black
3141red
3242green
3343yellow
3444blue
3545magenta
3646cyan
3747white

Thursday, August 16, 2012

Fix WSUS Internal DB if corrupted


sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

ALTER DATABASE SUSDB SET SINGLE_USER WITH NO_WAIT

DBCC CHECKDB

go

If the about command cannot fix, try this one but will have data loss
DBCC checkdb ('SUSDB', repair_allow_data_loss)


Finally,
ALTER DATABASE SUSDB SET MULTI_USER WITH NO_WAIT
go