Performing WUSU 3.0 database maintenance (database re-indexing) via WsusDBMaintenance under Windows Server 2008

System Requirements:

  • Windows Software Update Services 3.0
  • Windows Server 2008, 2008 R2

The Problem:

Microsoft recommend that you perform monthly maintenance on your WSUS database to keep it in good order. The following pages represent the instruction for undertaking this activity

This document simply seeks to clarify the process when using Windows Internal Database (instead of SQL Server) under Windows Server 2008/R2.

The Fix

The following summarises the steps involved in the process.

  1. Install the SQL Server Native Client for your processor on the WSUS server
  2. Install the SQLCmd utility for your processor on the WSUS server
  3. Copy & Paste the T-SQL code from Re-index the WSUS 3.0 Database into a notepad file and save it on c:\ as WsusDBMaintenance.sql (or download here)

If you wish to automate or schedule the task:

  1. Create a .cmd file on your desktop
  2. Enter the following into it
"c:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe" -I -i"c:\WsusDbMaintenance.sql" -S "np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query"
  1. Note that the version of the SQL Server SQLCmd that you install will need to be reflected in the version number (90 above). 90 = SQL Server 2005, 100 = SQL Server 2008 and so on.
  2. Right click the .cmd file and select “Run as Administrator” to launch it through an elevated command prompt
  3. If you setup a scheduled task for this, remember to set the always run with full permissions option.

If you just want to run it once:

  1. Open an elevated command prompt
  2. Enter the command:
"c:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe" -I -i"c:\WsusDbMaintenance.sql" -S "np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query"
  1. Note that the version of the SQL Server SQLCmd that you install will need to be reflected in the version number (90 above). 90 = SQL Server 2005, 100 = SQL Server 2008 and so on.

PEAR for PHP Error “No releases available for package “xxx” install failed” after running ‘pear install xxx’ on Windows Server 2008

System Requirements:

  • Windows Vista
  • Windows 7
  • Windows Server 2008, 2008 R2

The Problem:

You know that something a bit odd is going on when one of a batch of servers starts throwing errors that the others sailed past. In this case trying to configure PEAR for a new PHP install with Mail, Mail_Mime and Net_SMTP (pear.php.net/mail, pear.php.net/mail_mime and pear.php.net/net_smtp) should be fairly standard. The other servers took the install and even this server too Mail and Mail_Mime but would not accept Net_SMTP returning:

C:\Program Files (x86)\PHP>pear install net_smtp
No releases available for package “pear.php.net/net_smtp”
install failed

Leaving it overnight before rolling up my sleeves (in case it was just downtime at the package repository) the fix was fairly simple.

The Fix

If you are experiencing the same problem this server was having, running the following

pear remote-list

Will result in

SECURITY ERROR: Will not write to C:\Users\<user[8.3]>\AppData\Local\Temp\pear\cache\e9b88593398eb79a9aa91024351d646arest.cacheid as it is symlinked to C:\Users\<user>\AppData\Local\Temp\pear\cache\e9b88593398eb79a9aa91024351d646arest.cacheid – Possible symlink attack

If you get something akin to the above simply browse to:

C:\Users\<user>\AppData\Local\Temp\

and delete the pear folder

Error 0x80070005 when using SWbemLocator.ConnectServer to initiate a WMI session despite using the correct username and password

System Requirements:

  • WMI 1.5 or higher
  • Windows 95, 98, 98SE, Millennium
  • Windows NT 4.0, 2000, XP, 2003, Vista, 2008, 7

The Problem:

When using WMI’s SWbemLocator.ConnectServer class to log onto a remote system, you receive an 0x80070005 access denied error (Decimal -2147024891).

This error occurs even though the username and password are correct and the account credentials are synchronised properly between the local and remote machine – either by domain or manually in a workgroup.

More Info

The classfull connection line for using SWbemLocator is:

Set objWMIService = objSWbemLocator.ConnectServer(<computerName>, <wmiDefaultClassPath>, <username>, <password>)

for example:

Set objWMIService = objSWbemLocator.ConnectServer("192.168.0.100", "root\cimv2", "Administrator", "12345abcde")

The Fix

There is a very good chance that the problem you are having is to do with the username you are entering. You need to ensure that you are prefixing the username with the logon domain.

For example if your domain is camie.local your username should be camie\Administrator

Set objWMIService = objSWbemLocator.ConnectServer("192.168.0.100", "root\cimv2", "camie\Administrator", "12345abcde")

But I’m using a workgroup!

Don’t worry, you can do one of three things.

  1. Prefix the remote machine name (the local logon domain)
  2. Prefix the workgroup
  3. Send a null logon domain
Set objWMIService = objSWbemLocator.ConnectServer("192.168.0.100", "root\cimv2", "myHostName\Administrator", "12345abcde")

Set objWMIService = objSWbemLocator.ConnectServer("192.168.0.100", "root\cimv2", "workgroup\Administrator", "12345abcde")

Set objWMIService = objSWbemLocator.ConnectServer("192.168.0.100", "root\cimv2", "\Administrator", "12345abcde")

Using one of the above, you should be able to connect to the remote workstation. If you are dealing with a mix of workgroups or cannot know the hostname in advance I suggest using \<username> with I have tested to work on Windows 95 right through to Windows 7.

Unable to install Windows Server 2008 R1, Windows Vista or Windows 7 on a Dell PowerEdge 2600 – Setup error 0x80070022

System Requirements:

  • Dell PowerEdge 2600
  • Toshiba SD-C2502 DVD-ROM Drive

The Problem:

When you try and install an edition of NT 6 x86 on a Dell PowerEdge 2600 using self-created DVD media (DVD-R, DVD+R, DVD-RW, DVD+RW) the setup program takes a very long time to start and after around 30 minutes of “Expanding files” sitting on 0% setup fails with the error code 0x80070022.

More Info

The problem isn’t an incompatibility with the systems and NT6, it’s most likely the DVD ROM drive itself. You should of course check to make sure that the DVD-R(W) media that you are using is integral and hasn’t failed to burn properly. If the media works fine on other systems then check to see if the machine has a Toshiba SD-C2502 drive.

If it does then it is probably manufactured in or around August 2002 using firmware 1D13 (dates 03/08/2001) before all of the DVD media specifications were standardised. Dell unhelpfully neglected to supply the firmware update for the drive to support improved media compatibility. As you may have guessed, the media can get you into the setup program, but the slow speed is because of an increased number of forced read errors.

The Fix

The good news is that there is firmware available that may resolve this for you. Although Dell neglected to make it available on their PowerEdge support section, the drive is a plain old IDE drive, one that Dell used on a number of other systems. To be precise:

  • Inspiron 2500
  • Inspiron 2100
  • Inspiron 4100
  • Inspiron 8000
  • Inspiron 8100
  • Inspiron 2600
  • Inspiron 8200
  • Inspiron 2650
  • Inspiron 4150
  • Latitude C500
  • Latitude C510
  • Latitude C540
  • Latitude V710
  • Latitude LS
  • Latitude C400
  • Latitude C600
  • Latitude C610
  • Latitude C800
  • Latitude C810
  • Latitude L400
  • Latitude C640
  • Latitude V740
  • OptiPlex GX150
  • OptiPlex GX240
  • OptiPlex GX260
  • OptiPlex GX260N
  • Dell Precision Mobile WorkStation M50

So if you head to the support pages on Dell for one of those you will find the SD-C2502 firmware update which addresses:

This firmware addresses various readability related issues.

The firmware at shipping is 1D13, this updates it to 1D23 and will hopefully get you installing. If you want to search Dell Support for the file name look for br59016.exe

If that doesn’t fix it, it’s a standard IDE drive, simply grab one from any > 2003 laptop and you should be good to go.