When attempting to install Citrix XenApp 5 on a Windows Server 2008 32bit machine, I kept running into a peculiar error.  The message I was being presented with was: "Error 26013. Function InitializeTree2 returned failure in CTX_MF_IMA_InitializeTree2 the database username or password may be wrong."  The odd thing was that I knew the database credentials were correct.

After troubleshooting for several minutes, I had a sudden stroke of genius.  I found the Independent Management Architecture folder within the C:\Program Files\Citrix directory and checked the applied Windows permissions.  Sure enough, the install had not properly added the account which I was using to perform the installation of XenApp.  In addition, the MF20.dsn file did not have the proper permissions.  Granting the user proper rights and retrying the install resolved the problem.