When installing NAV 2009 database component on window server 2008 that has SQL server 2008 installed, the following error may occur:

Failed to connect to SQL database (-2147467259 master)

This error is typically triggered because when the local database was installed and then subsequently uninstalled, the SQL Server not available during the uninstallation. It is possible that SQL server was either uninstalled or was not running during the uninstallation.

This issue can be resolved by performing one of the following tasks:

1. Run the following command:

msiexec /x {B4222DEE-71BD-11DC-8BA7-C1C855D89593} SKIPUNINSTALLSQLDATA=1

2.  Install/start SQL Server and manually drop MantisSQLDB or MantisSQLDBEval database after

the uninstallation.

Source: http://msdn.microsoft.com/en-us/library/bb521687(WinEmbedded.51).aspx