You receive the following error: “Cannot connect to the configuration database”.
First, try this script, from an administrator command prompt
cd\
cd Program Files\Common Files\Microsoft Shared\Web server extensions\12\BIN
psconfig -cmd upgrade -inplace b2b -force
More on this here: http://blogs.technet.com/b/sbs/archive/2009/05/06/companyweb-inaccessible-after-sharepoint-3-0-service-pack-2.aspx