Installing Windows XP Professional in VMWare ESX-Server

Having been working with VMWare for a couple of years I finally upgraded from VMWare Workstation to an ESX-server. ESX means “more power”!!

Well, installing an OS in VMWare is quite easy, just create a new virtual machine and off you go! Windows XP will boot from CD (or even better use an ISO image) and detect all of the virtual hardware without any hassle.

Installing Windows 2003 Server on the ESX is just as easy; but installing my first Windows XP client kinda got to me. Windows refused to detect my virtual hard-disk (neither the LSI nor the BusLogic controller would be detected by the installer). So after a while I figured, there would be some floppy-images on the ESX. So I pressed F6 during the startup of the installer to add the SCSI-Driver provided on the floppy.

As it turned out, the SCSI-Driver only supports the BusLogic controller … instead of the LSI; which is the default-controller added to a new virtual machine.

Restoring Databases without Transaction Logfile

Well, if (for what reason ever) you stopped your SQL-Server, delete a huge transaction logfile of your database (you know, those damn *.ldf files that fill up your hard drive) and tried to restart you server and access your db … you will fail.

Detaching and re-attaching the database won’t do. In this case, try something like this:

USE master;
EXEC sp_attach_single_file_db  @dbname=  '[mydbname]' ,  @physname= 'E:\Database\[mydbname]_Data.mdf';

Determine uptime in Windows

On *nix system the command uptime is quite well known, but on windows there is no such command, at least not out of the box.

There are a couple of ways to work around this shotcomming:

  1. you can execute systeminfo on cmd.exe and search for System Up Time
  2. you can execute net statistics server and look for the time, since when the local server has been running
  3. you can install uptime.exe from Microsoft

Renaming of SQL-Server

If you have to rename an existing server running MS SQL-Server is more complicated than you might think. Just renaming the server is not enough.

Especially renaming the running SQL-Server is at first challenging. You cannot just open the properties and do something like “rename”. In order to rename a SQL-Server you have to execute a SQL-Statement:

 USE master
 EXEC sp_dropserver 'old-servername'
 EXEC sp_addserver 'new-servername', 'LOCAL'

Especially tricky is, that Microsofts documentation was missing the LOCAL part of the sp_addserver statement.

Link: BUG: “Renaming A Server” Topic in SQL Server Books Online is Incomplete