5

So, I was running a localhost SQL Server and I tried to edit the first 200 rows of a table. Then I have received this (the original is in German, I found this one through the net):

enter image description here

After this, SSMS closes. I researched and I found out that this is a known issue, if the PATH variable is more than 2K signs. Mine is 1336, so the problem should be somewhere else.

This is the path variable:

C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files (x86)\Intel\iCLS Client\;
C:\Program Files\Intel\iCLS Client\;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Intel\WiFi\bin\;
C:\Program Files\Common Files\Intel\WirelessCommon\;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;%systemroot%\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;
C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;
C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;
C:\Program Files (x86)\Windows Live\Shared;
C:\Program Files\Git\cmd;%USERPROFILE%\.dnx\bin;
C:\Program Files\Microsoft DNX\Dnvm\;
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;
C:\Program Files\TortoiseSVN\bin

Sometimes, depending on my luck I even do not get an error message but this: enter image description here

It means that the SSMS is going to be restarted.

Additional points:

  • SQL Server 2014
  • The issue exists just on localhost. If I connect to a server, it is ok.
  • I have enough RAM.
  • Localhost was working for about a day, but somehow decided to make this.

What I have tried:

Further info and updates:

  • I have no repair option in Add/Remove Programs: enter image description here

  • The DB was created by me using SSMS 2014. It had nothing to do with previous versions.

  • The error appears after trying to edit the first 200 rows: enter image description here

  • Error details on the error message (In German, but the language is not that important):

Important EDIT - this seems to be important! This is the info from the studio:

Microsoft SQL Server Management Studio 12.0.2000.8

Microsoft Analysis Services-Clienttools 12.0.2000.8

Microsoft Data Access Components (MDAC) 10.0.10586.0

Microsoft MSXML 3.0 6.0

Microsoft .NET Framework 4.0.30319.42000

Betriebssystem 6.3.10586

Concerning the server:

  • the one in the cloud without problems is 12.0.4213

  • the localhost one where the problems appear is 13.0.1100

I think this should be something.

Vityata
  • 42,633
  • 8
  • 55
  • 100
  • SSMS is not SQL Server. It's just an application, like Notepad or Visual Studio. Please DON'T restart the PC, the server, modify the path, drop the database or do anything that can only *cause* problems instead of fixing them. No matter what you read in random articles, they don't help at all. On the other hand, the purpose-buitl "Repair" option found in all applications *can* fix corrupted application installations. – Panagiotis Kanavos Sep 09 '16 at 08:40
  • 1
    Finally, just add the *latest* version of SSMS. SSMS is now a separate product with frequent, automatic updates. You don't need to install it using SQL Server's installer – Panagiotis Kanavos Sep 09 '16 at 08:41
  • Out of curiosity, where did you find that an access violation has something to do with the PATH ? Have you found a specific KB article about **SQL Server 2014** specifically, or a generic article that may or may not apply? – Panagiotis Kanavos Sep 09 '16 at 08:45
  • You can download the latest version of SQL Server Management Studio [from this url](https://msdn.microsoft.com/en-us/library/mt238290.aspx). You get automatic notifications when an update is available, just like Visual Studio – Panagiotis Kanavos Sep 09 '16 at 08:47
  • @PanagiotisKanavos - http://www.dirkstrauss.com/exception-thrown-target-invocation/#.V9J3fpiLRhE – Vityata Sep 09 '16 at 08:49
  • http://stackoverflow.com/questions/23634505/exception-has-been-thrown-by-a-target-of-invocation-in-visual-studio-2013 – Vityata Sep 09 '16 at 08:49
  • The links refer to completely unrelated errors and don't even refer to bugs. They certainly aren't KB articles or bug reports in Connect, so you can't say they are known bugs. They may have the same *message box title* but the actual exception shown in the text is different. The error you posted is about a memory access violation. You probably have a broken plugin installation. You can repair your installation from Programs & Features although a better solution is simply to install the latest version. The actions you performed didn't help at all but they could have caused additional problems – Panagiotis Kanavos Sep 09 '16 at 09:57
  • Well, I have installed the latest SQL SMS update, restarted, and the problem is still there. Just by localhost. – Vityata Sep 09 '16 at 10:17
  • What do you mean "just by localhost" ? Have you tried connecting to *another* server without problem? Have you installed any SSMS plugins? When does this error appear? What operation did you perform that resulted in this error? – Panagiotis Kanavos Sep 09 '16 at 10:55
  • PS, the error boxes of SSMS display the *full* error information when you click on the file icon with the red circle on the lower left corner. Typically this contains the actual component that threw the exception. – Panagiotis Kanavos Sep 09 '16 at 10:57
  • @PanagiotisKanavos, yes, I connect to other servers without problem. The opration was right button -> Edit first 200 rows. – Vityata Sep 09 '16 at 11:20
  • 1
    And the error details ? *These* are the relevant information that will tell you what went wrong. Up to this point the only thing we know is that you have an access violation error. There may be an error entry in Event Viewer, but the full details (including the full exception call stack) are returned by the dialog box itself if you click on the error icon – Panagiotis Kanavos Sep 09 '16 at 11:21
  • For example, a bad OLE component registration (missing registry entries) could result in a component handle equal to 0. When SSMS or some third-party code tries to use this handle, you'll get an access violation. The exception call stack will show *who* tried to make the bad call – Panagiotis Kanavos Sep 09 '16 at 11:28
  • Well, it is a localdb and I am the only one working with it, with two apps - SSMS and Excel. I have updated the error details. – Vityata Sep 09 '16 at 11:30
  • Is the error occurs only for this database or every time you want to edit database ??? – RU Ahmed Sep 10 '16 at 18:11
  • Anyone any ideas? I have set a small bounty for the solving... – Vityata Sep 14 '16 at 12:30
  • 1
    Have you seen http://stackoverflow.com/questions/16856548/database-diagrams-inaccessible-after-change-of-database-name as it has an accepted answer? – artm Sep 16 '16 at 12:52
  • @artm - I really do not have a 2. PC, so I cannot replicate. – Vityata Sep 16 '16 at 12:56
  • @Vityata I know but same exception/same call stack so thought might help. – artm Sep 16 '16 at 12:57
  • @artm - I saw it, thus I have changed the answer. – Vityata Sep 16 '16 at 12:58
  • @Vityata Do you have access to the server to take those files from instead of a 2nd PC? – artm Sep 16 '16 at 13:05
  • @artm - it is localhost, the server is by my pc. And generally, I am not a fan of copying and switching dll files, without understanding how it works. Generally, I can still work with some workaround - if I want to edit a table I can do it through a query, it works. But it is unpleasant and more time consuming. Anyhow, thanks for pointing out the link, I did not find it before. – Vityata Sep 16 '16 at 13:11
  • @Vityata OK. What do you mean by "Well, it is a localdb and I am the only one working with it, with two apps - SSMS and Excel.". Are you using excel at the same time to access the DB? – artm Sep 16 '16 at 13:28
  • @artm - no, not in the same time. And I close the connections properly. And even after a restart of the PC, the issue exists. – Vityata Sep 17 '16 at 11:17
  • 1
    @Vityata One last comment, if I understand right you are using latest 2016 SSMS (16.3) but your server is 2014 SQL, right? Can you try this with 2014 SSMS with your existing 2014 SQL server? Or try your 2016 SSMS (16.3) on a 2016 SQL server? – artm Sep 18 '16 at 00:08
  • @artm, actually the comment is pretty good. It seems that the versions of my localhost (where the problem is) and the version of the server to which I connect and do the edits without problems is different (see the last edit in the question). However, I do not select anything for the localhost version, I simply write "(localdb)\MSSQLLocalDB". Ideas here are welcomed. – Vityata Sep 19 '16 at 07:47

1 Answers1

5

Please Check the version of your SQL Server Management studio .... I have faced same problem as you mention. It occurred because i was trying to edit database of SQL server 2014 With SQL Server Management studio 2012. The solution is that you have to update your SQL Server management studio update your SQL Server management studio to 2014 or higher

UPDATE : You can try by running SQL server Management Studio as an Administrator.(Just right-click the icon and select Run as Administrator )

RU Ahmed
  • 558
  • 4
  • 23