Category Archives: Windows knowhow

Howto do some things in Windows

MSSql: Database cannot be opened. Marked as suspected

Hi,

the WSUS DB (MSSQL Express 2005) of a customer won’t start after a hardware failure and bluescreen. Here are the steps which recovers the database back in an usable state.

The SQL Server Instance logs errors like this

"Could not redo log record (183366:6166:54), for transaction ID (0:117029942), on page (1:657511), database 'SUSDB' (database ID 5). Page: LSN = (183267:2976:260), type = 2. Log: OpCode = 2, context 3, PrevPageLSN: (183366:1717:287). Restore from a backup of the database, or repair the database."


in “C:\Windows\SYSMSI\SSEE\MSSQL.2005\MSSQL\LOG\ERRORLOG” and the database is down.

First connect to the DB Instance using a named pipe


c:\> sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

Continue reading MSSql: Database cannot be opened. Marked as suspected

Windows: Script to uninstall all Hotfixes and Updates

Hi,

here is a “oneliner” to uninstall all Windows Update at once. They were deinstalled in order from the highest to the lowest KB Number which increases speed of the remove process(Latest fix first).
Continue reading Windows: Script to uninstall all Hotfixes and Updates

Windows: Apply a local policy for all user expect Administrator Accounts

Hi,

this is a very common task 🙂

Continue reading Windows: Apply a local policy for all user expect Administrator Accounts

Windows: Get a device serial number from command line

Hi,

it’s simply possible to get the serial number of your Windows device at command line. Precontition is that the vendor has done it’s home work and filled up the DMI tables correctly 🙂 .

Continue reading Windows: Get a device serial number from command line

Windows: Start a cmd.exe with system rights

Hi,

since Windows 2008 and Windows Vista it is no more possible to start a cmd.exe with system rights by using the (Task)Scheduler.
Continue reading Windows: Start a cmd.exe with system rights