28 Mar 2012

Updating IBM System x Server Firmware

Being used to primarily dealing HP hardware, I was at a loss to how to go about updating the firmware on IBM System x  (x86) servers. It's straight forward with a bit of googling..

One approach is to download the appropriate firmware using IBMs 'UpdateXpress' to a local repository and then use the 'Bootable Media Creator' to either create CD, USB or PXE boot media.

UpdateXpress can be found http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=SERV-XPRESS

BoMC - http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=TOOL-BOMC

21 Mar 2012

The Accidental DBA Survival Kit - Part 1

I occasionally get drawn into some DBA related tasks, so yes I'm an "Accidental DBA" and I've decided to start compiling the snippets of code that I often have to use.

How to get a quick overview of a database

USE Database Name
EXEC sp_helpfile

Getting out of a Transaction Log 'Bear Trap'  


The following T-SQL can be used if you have exhausted your Transaction Log disk space and you have no other way either granting additional space. ***Warning this will break the transaction log chain***
USE DatabaseName
GO
DBCC SHRINKFILE(TransactionLogName, 1)
BACKUP LOG DatabaseName WITH TRUNCATE_ONLY
DBCC SHRINKFILE(TransactionLogName, 1)
GO

Update 1:


View all Databases on a SQL Server

EXEC sp_databases
View all Databases and some brief information
 EXEC sp_helpdb

9 Mar 2012

Lessons learnt while P2Ving Servers

I'm in the process of P2Ving some legacy servers to reduce rack space and thought I'd document the issues/errors/recommendations that I've encountered while doing it.

Recommendation: Document at least the following details before performing a cold clone of a physical server;
  1. Local Admin password (Reset if required)
  2. Current NIC Speed/Duplex
  3. IP Address, Subnet Mask & Default Gateway
  4. All drive space usage, add ~50% when resizing for the VM
  5. Disable the connect to network so that the VM doesn't knock the physical server off when it comes up initially
Recommendation: Try and use a Gigabit network connection for the source server that you're converting, it'll save a lot of time.

Recommendation: I've found that I can monitor the Host's network usage in vCenter to give an indication of the status of the conversion. If there's network activity above the normal trends then the server is receiving information from the P2V process.


Issue: Stuck at 2% progress with the log displaying "Formatting target volume c:..."

Resolution: Change Speed and Duplex of the NIC to 'Auto' if not already configured that way or if at 'Auto' change to a compatible speed.

23 Feb 2012

Firewall rule for IIS 7.5 on Server 2008 R2

I've been attempting to install and configure FTP on IIS 7.5 today and had an issue which I believed to be related to the Windows Firewall on the server, while the FTP service appears to be in the list of allowed applications which can pass through the Windows Firewall, a remote FTP connection would still not work.

I found an interesting article advising to add svchost to the allowed applications, which then led me to this article

To get "insecure" FTP working, I ran the following from an elevated command prompt on the server and sure enough it work :o)
netsh advfirewall firewall add rule name="FTP (non-SSL)" action=allow protocol=TCP dir=in localport=21

IIS 7/7.5 Best Practices and Inetpub Relocation

When building Server 2003 web servers, I used the unattended install method to relocate IIS 6 to a drive other than the C: drive, with Server 2008, this isn't possible but the inetpub can be relocated post install.

A list of IIS 7/7.5 best practices compiled by Vivek Kumbhar can be found here and a move script for the relocation of the IIS inetpub can be found at Thomas Deml's blog.

N.B. The syntax for the moveiis7root.bat script is
moveiis7root.bat driveletter

30 Nov 2011

CIMC - The maximum number of user sessions has been reached.

When building our first Cisco UCS server, I somehow managed to consume the maximum amount of web browser sessions on the server's CIMC and was receiving 
The maximum number of user sessions has been reached. 

This can be resolved by using SSH to the CIMC IP address and logging in with the administrator credentials. Once in, the active sessions can be viewed using
show user-session

 To change into the context of the user session enter the following replacing sessionindex with the session number

scope user-session sessionindex

To kill the session enter;
terminate

To escape the user session type
exit

Also if necessary the CIMC can be rebooted independently from the server chassis by entering
scope cimc

Once in the CIMC scope 

reboot

Answer 'y' to the prompt to reboot the CIMC

16 Nov 2011

MS KMS and publishing to additional Domains

MS KMS automatically publishes a SRV record to the DNS of it's local domain, which is ideal if there is a single AD forest/single domain configuration, but if instead there's a single AD forest with multiple domains then straight out of the box, a single KMS deployment isn't going to cut it.

Obviously, one or more KMS servers can be deployed in each domain in the forest but even with virtualisation that approach can become expensive, time consuming, complicated from a licensing compliancy perspective. Therefore I propose the following, configure the one (or two) KMS servers located in (maybe the forest root) to service the other domains too.

Once the KMS is configured and working, open Regedit.exe and navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform

Create a new Multi-key Value and name it DnsDomainPublishList. Edit this new registry value and enter a list of the domains which the KMS is to publish to, one per line. (see below)



Once the entries have been made, restart the 'Software Protection' service.

In order for KMS aware clients to 'find' the KMS, it registers SRV records in DNS _VLMCS._TCP., confirmation that this has occurred can be found in the Application Event log on the KMS server with an Event ID of 12294, with the message;

Publishing the Key Management Service (KMS) to DNS in the fake.company.com' domain is successful.
If any 12293 Event IDs exist with

'Publishing the Key Management Service (KMS) to DNS in the 'fake.company.com' domain failed.
Info:
0x80072338

Check  the _tcp. for an existing _VLMCS SRV record, as a KMS may have already been unwittingly introduced to the environment.