Failed to conect to database.
Maximun number of connections to instance exceeded[Connection failed when attempting to connect using a 9.3.1 direct connect driver to a 9.2 geodatabase. Missing suitable direct connection driver for this connection type. Please install the 9.2 direct connection driver. ArcSde Direct Connect driver release = 93004; ArcSde database instance release - 92011; ArcSde low release for instance - 92005]
The first part of the message indicates that more people are trying to connect to the geodatabase than you have set to allow. There is a setting in the server_config table, CONNECTIONS, that determines how many simultaneous connections you can have to the geodatabase. By default, this number is 48. If you need to increase that number, use the sdeconfig administration command utility with the alter operation to set it to a higher number; for example:
sdeconfig -o alter -v CONNECTIONS=75 -u sde -D mydatabase -i sde:sqlserver:myinstance
The rest of the message makes it sound like your client doesn't have the direct-connect driver it needs. But if it works sometimes and not others, that doesn't make sense. If upping the connection property doesn't help, please contact Esri support for assistance.