How to Investigate and Resolve The “You May Need to Recreate Views Manually” Error in Sage CRM
This error message is as old as Sage CRM itself. A long time ago, there was a thread on the Sage CRM / Accpac Partner Forum that gave a possible solution to this error. The solution involved dropping the vSentinel view from the CRM database, restarting IIS, and logging back in. The thought was that there was a problem with the database views and that following these steps forces Sage CRM to rebuild all views upon logging in after an IIS reset. The problem was that following those steps didn’t always resolve the error. Eventually I discovered that “You May Need to Recreate Views Manually” was really code for “Your System Is Having Trouble Connecting to the Database”. After I realized that, troubleshooting this message became a lot easier to resolve.
The first thing I do when I come across this error is check the CRM SQL log file for information that may point to the cause. Normally I would access the CRM log files from within the application, but due to the error, that is not an option. The next best way to access the logs is to navigate to the CRM installation path on the application server. If you’re unsure what the CRM installation path is, you can always check the registry editor on the application server under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\eWare\Config\/<Your CRM Instance Name> and look for the InstallDirName key. Once you have this info and navigate to the install directory, drill into the Logs folder. You will need to look for the most recent ewaresql.log file. Most of the CRM log files are prefixed with a date stamp in the format of YYYYMMDD. Once you find the log file you are looking for (e.g., 20160804ewaresql.log), open it with a text editor and view its contents.
In my log file, I can see the following error message listed many times:
Aug 4 2016 16:15:01.907 22132 24780 1 SQLClasses->DatabaseLogin:ERROR:Login failed for user ‘sa’
That error message could mean a few different things:
- The SQL user does not exist.
- The SQL user has been disabled.
- The SQL user’s password is incorrect.
For testing purposes for this article, I had previously logged into SQL Server and changed the password for the SA user. All of my CRM instances are configured to use the SA user. The database connection information is stored in the registry for each instance. By changing the SA password inside SQL Server, subsequent login attempts to CRM fail, and I receive the dreaded “You May Need to Recreate Views Manually” error. When I change the SA password back in SQL Server, I’m able login to CRM without error.
So the next time you see this error message when attempting to login to your Sage CRM environment, your best bet is to check the CRM SQL log file. Most times the problem is easily identified and can be resolved quickly.