SQLITE | BASH | handle ‘database locked’

function do_sql { DB=”$1″ shift test -r “$DBDIR/$DB” if [ $? -ne 0 ]; then write2log “Creating DB $DB” create_db “$DB” fi if [ “x$@” == “x” ]; then return 1; fi LOOP=1;MAXLOOP=10 while true;do $SQLITE “$DBDIR/$DB” “$@” 2>/dev/null && return 0 LOOP=$(( $LOOP + 1 )) RD=”0.$(( ( RANDOM % 9 ) + 1 […]

Microsoft | WSUS – Clearing the syncronization history

Loading the syncro history in wsus mmc is very slow and can lead to a timeout [request for server node reset]. In this case delete old history entries: * Start the SQL server management studio * —> Databases —> SUSDB —> right click —> New query USE SUSDB GO DELETE FROM tbEventInstance WHERE EventNamespaceID = […]