So the SQL account password expired for your View Composer. Bummer. This must mean you’re here because you’re seeing and googled error messages like this in event Viewer under VMware View Composer:
“[Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user ‘<user>’
and this in the %PROGRAMDATA%\VMware View Composer\Logs\vmware-viewcomposer.log
NHibernate.ADOException: cannot open connection —> System.Data.Odbc.OdbcException: ERROR  [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user ‘<user>’. Reason: The password of the account has expired. ERROR  [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user ‘<user>’. Reason: The password of the account has expired.
Good news space heroes, there’s a really well documented VMware KB procedure on how to recover from just such a scenario. Other things to try before doing this procedure:
- Verify the SQL server and composer database are online
- Verify the View Composer DSN is in place on the composer server
- Verify the account is enabled and you can login, testing the DSN with the credentials you used.
- Verify the account permissions haven’t changed on the View Composer Database
- Verify the database is intact
In the recent case of quickly fixing this that I encountered, we changed the password to the same password and that still didn’t work. Following this procedure of re-creating the SviWebService.exe.config worked. This is because the password is encrypted and stuffed into the config file using the certificate data. The basic steps that are in this article are:
- Find the SviWebService.exe.config file in the DRIVE:\Program Files (x86)\VMware View Composer directory
- Copy the SviWebService.exe.config file to a temp directory like C:\tmp
- Copy the SviWebService.exe.config file to a temp directory like C:\tmp and rename it to SviWebService.exe.config.old
- Open a command prompt and cd to DRIVE:\Program Files (x86)\VMware View Composer directory
- Open a notepad and paste this command in, make sure to modify the bolded parts to fit your environment:
- SviConfig -operation=SaveConfiguration -dsnname=DSNNAME -username=USERNAME -password=PASSWORD -passwordchanged=true -NHibernateDialect=NHibernate.Dialect.MsSql2005Dialect -tcpport=18443 -KeyContainerName=SviKeyContainer -keySize=2048 -CertificateThumbprint=”B632769D553604A14361142016189BD5F5722267” -ConfigPath=”C:\tmp\SviWebService.exe.config” -OldConfigPath=”C:\tmp\SviWebService.exe.config.old”
- You can get the Certificate thumbprint by opening the original SviWebService.exe.config in notepad and searching for CertificateThumbprint.
- DSNNAME is the name of the DSN as it appears in ODBC administrator. I did a configure on it then a copy paste for ensured accuracy.
- Once you run that you should see configuration saved successfully.
- If you see SviConfig finished with an error. Exit code: 5 you probably did something wrong like copy the wrong config file or didn’t do one of the file copies right. For example I copied the wrong config file the first time, then didn’t rename them exactly right.
- If you are sure that you copied it right and are still getting an error, sounds like you’ll need to make a backup of the SQL database and do a View Composer uninstall/reinstall.
- The final step before starting the service is to copy the modified SviWebService.exe.config file to the DRIVE:\Program Files (x86)\VMware View Composer directory. Works! Huzzah! Now to go talk to that DBA about service account expiration policies…