Category: SQL Server
view more software Tips and Tricks
Updated: 03/26/2016 07:03 AM
Author: Shiju Mathews
After some of the updates when I am trying to open SQL SERVER Management Studio, the application is crashing with the following error. :Exception has been throws by the target of an invocation".When i tried to open visual studio , the same error appears again.
The issue is from the limitation of 2048 characters in the path variables. When installer or updates tried to add more characters to the path variable, the string may be updated first and the trimmed with 2048 characters. In some cases the trimming is not happening, but system will only take the first 20148 characters. In bot cases the applications those are falling on 2048 characters or later will be affected.
To fix the issue.
1. In the Control Panel under System, click on ‘Advanced system settings’.
OR navigate to "C:\Windows\System32" and open "SystemPropertiesAdvanced" application.
2. Popup will appear with title "System properties".
3. Click on advanced tab.
4. Click on Environment Variables button on the window(almost the bottom of the window).
5. locate path variable on the System variable area.
6. Select "path" and click on Edit button on the bottom.
7. Copy the variable value on a note pad and remove the path for some unwanted applications.(keep a copy of the original values, encase we need it in future.).
8. Paste the edited path variables back to the variable value and click, OK button on the bottom.
9. Restart the machine.