The can be several reasons why this message appears and it usually comes when there has been a change in the configuration of the system. This maybe as a result of an upgrade, or if the SQL password for the "sa" user has been changed, and the same change has not been affected in CRM.
There are some helpful questions to ask when this happens.
Does the error appear for all users?
If the system administrator can logon but another user can not, you will have to turn on the system logs and see what happens. Start looking at the SQL logs and see if the requests are getting to the database. It may give you enough information to sort out the problem.
Is your database running?
UnableToConnectToDB
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
Driver: MSSQL
Server: UKTRAINING
Database: CRM
LoginName: sa You may need to recreate views manually.
This is symptomatic of a database server that is not running. Can you connect using query analyser or other SQL tool?
If the database is already running.. stop and start the database service and retry.
Have you just restored a backedup database?
The error message can appear when you have a mismatch between database and CRM versions. For example you may get the message if you have restored a Sage CRM 5.8 database to an install of Sage CRM that is 6.0
Is CRM trying to connect to the correct database?
Go to start\run\regedit\HKEY_LOCAL_MACHINE\SOFTWARE\eware\config click on the CRM beneath that and see the right panel see that default databaseserver name is exactly you have, if it is not, then change it manually. You'll need to do an IISRESET before you try and logon again.
Have you changed the database password?
UnableToConnectToDB
Login failed for user 'sa'
Driver: MSSQL
Server: UKTRAINING
Database: CRM
LoginName: sa You may need to recreate views manually.
This can be symptomatic of when the "sa" password was entered correctly but contains a special character, such as $, in the beginning.
Or more alarmingly it can be symptomatic of someone or something (e.g. a Virus, worm etc) changing the password on the database server.
Note:
If you need to change the "sa" password, the correct thing to do is to logon to CRM, change the database password under Administration>System>Database first, then reset the password in MSSQL, and finally reset IIS and logon to CRM again.
But if the database "sa" password has been reset first, then it will not be known to CRM, so you will not be able to connect to the database. Then you'll need to reset the password in MS SQL to the previous password.
But what if you don't know the database "sa" password? You will first need to reset the "sa" password to something you do know. Then you will have to reset the password in the CRM registry. (Backup the registry before doing this!!!).
In the registry browse to HKEY_LOCAL_MACHINE | SOFTWARE | eWare | Config | [CRM], where [CRM] is the name of the CRM instance.
You can set the DatabasePassword to the new database password in plain text. Do an IISRESET, then you should be able to logon to CRM. Once you have logged on to CRM go and reenter the new password and it will be saved back into the registry in encrypted form.
There is a view in the Sage CRM database called "vsentinel". When CRM first starts up (after an IISRESET) and it finds that vsentinel is not present, it will use this as the trigger to force the recreation of the views based on the definitions stored in meta data. Once the other views have been recreated it then creates the trigger view "vsentinel" again.
To force the recreation of the views do this:
1. Do IISRESET from the Run prompt.
2. Go to the SQL Manager. Take a backup of your CRM SQL Database first.
3. Now through SQL Manager itself, select the CRM SQL Database instance. There you will find an option Views which lists all the Views against it.
4. Select the user view "vsentinel". All CRM views are prefixed with ‘v’.
5. Press the Delete key from the keyboard and drop the view.
6. After the IISRESET, try to login to CRM and see whether you are able to log in to CRM now or not.
CRM GREEN CUSTOM SETTINGS
DO NOT CHANGE FORMAT BETWEEN 'CRM SETTINGS' TAGS
[CRM SETTINGS]
[INITIALIZATION]
//theme file version
VERSION = 1.0
[COLORS DEFINITION]
//wsEmailclient
COLORCAPTIONBLUE=#6795C3
//TSearchEntryGroup.GetEditHtmlFromContent
...
//WrbTriPage, WsEmailClient
FONTFAMILY=MS P-Mincho
...
*/
So what happens if I still can't log on?
Remember this was not an exhaustive article. Don't panic. Think about what has just changed in the system? Have you applied a new component? Can you restore to the prior state? Have a good look through the forums and knowledge base and then log a case with support.
I hope that this article has helped.