Error after importing the users profiles in SSP>Profmain.aspx page

Error after importing the users profiles in SSP>Profmain.aspx page "The user profile database connection cannot be made because of error”

Why this happens :

 - Profmain.aspx calls importStatus.LastCrawlSeedStatus to determine if an error occurred during the last profile import.

- If the LastCrawlSeedStatus value is not 0, it checks importStatus.LastLogEntry and provides the text message from the log

- LastCrawlSeedStatus is a property of the content source People_Import (Hidden Content Source)

- If the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\0\StartPages\0

- Or if the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\1\StartPages\0

- If the value to anything other than 0, we can reproduce problem

- The search account should have full control on this registry key

- The SSP account should have read access to this key.

How to Fix it :-

- Open the registry on the indexer server

- Checke the value of "lastCrawlSeedStatus" in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\0\StartPages\0

- And checke the value of "lastCrawlSeedStatus" in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Applications\<GUID>\Gather\ProfileImport\ContentSources\1\StartPages\0

- We changed the value to 0

- Restart search service on Index server (better restart the server if you can due to too long waiting for stopping and starting the Office SharePoint Search Services)