SQL Server Management Studio -> New Query -> "is not a valid win32 application" - sql-server

I have been using SQL Server Management Studio for years. Yesterday, when I started hitting "new Query", I would get the following error in pop up form:
"is not a valid win32 application".
I did a lot of googling, and I found this:
http://blog.sqlauthority.com/2009/04/30/sql-server-fix-error-is-not-a-valid-win32-application-exception-from-hresult-0x800700c1/
Which is not at all applicable (but I did set all of my application pools in my IIS to allow 32 bit applications on both the server and my client. I'm not sure how that would make any difference and it didn't). I thought maybe it was a problem with VSSHell, but I have been unable to find any valid information to fix it if it is.
I am using Windows 7 64 bit Ultimate.
My colleagues, who connect to the same SQL Server instance, do not have this issue (so it is a problem with my env).
I tried uninstalling and reinstalling.
I tried installing SQL Server 2008 R2 Management Studio (and express version).
I tried installing SQL Server 2005 Management Studio Express.
I even tried the SQL Server 2012 R0 Management Studio. In all, of these, when I click, New Query, I get a pop up that says "is not a valid win32 application".
Please help!

Had the same issue - it turns out one of the MS C Runtime libraries got corrupted somehow. I got the name from the exception details. In my case it was MSVCM80.dll in C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a, that was 0kB.
Once I replaced it with the actual file, all started working again.
My advice is - try to locate the faulty file that SQL Studio is trying to open (in my case the same error happened when I tried to start SQL Profiler, and I could trace the exception details there).
Good luck

Related

SQL Server debug Stored Procedure from .NET code

I'm wondering if there's a way to debug a stored procedure at the time it's called from .NET code? What are my possibilities?
I'm using Visual Studio 2013 Community Edition and SQL Server 2014
I have managed to figure it out myself.
It's quite similar to what you can find in VS 2010.
I had to import database as a project to my solution.
Turn on SQL Debugging in my application project properties.
Re-open my project.
Connect to my SQL Database through SQL Server Object Explorer.
Right click on my SQL Server I connected to earlier and check "application debugging".
Find SP I wanted to debug, double click on it, set my breakpoint (it says it will not be hit, but eventually it will).
Launch my application using debugger.
Everything now works as expected, the debugger stops at my breakpoint with no problem.

Unable to install Microsoft SQL Server 2012 Developer

I have a problem with installing SQL Server 2012 (no matter which edition I choose).
Installation usually runs well, but near the end shows up an error:
The help link points to not-existing article on MSDN page.
After I click OK button, the installation reaches it's end and shows up another window:
After that I am able to start, for example SQL Management Studio, but cannot connect to database. Also services of SQL Server are stopped and I am not able to start them manually (any try throws an undefined error):
I tried complete reinstalling of SQL Server, cleaning registry entries, different editions of that software - none method helped. Also, I tried the .iso images of installation media on other computers - it worked well and installed without any errors.
My OS is Windows 8.1 x64.

SQL Server Management Studio crashes after opening or creating database diagram

I have an error message that occurs every time I use SQL Server 2012 Management Studio to open or create a new database diagram, followed by an automatic restart of SSMS.
The error message is
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
(Microsoft.VisualStudio.OLE.Interop)
Here's what I did to produce this problem:
Earlier, I had installed SQL Server 2008: via an option available when I downloaded Visual Basic Express 2010. No errors yet. I could create and edit database diagrams without problems. Then I uninstalled VB Express 2010, and installed Visual Studio 2012, only to find out that it was a trial version, which I didn't like, so I uninstalled Visual Studio 2012. I launched SSMS 2008 and tried to open a database diagram in one of my databases. I received an error that said
Specified Module cannot be Found. (MS Visual Database Tools)
I installed SQL Server 2012 with Management Studio, and then used the SSMS 2012 to try opening the database diagram. And instead of Specified module error, I got the error about attempting to read or write protected memory.
I am running Windows 7, SQL Server 2012 Express and I didn't uninstall SQL Sever 2008 Express (yet), Visual C# 2010 Express, Visual Basic 2010 Express.
EDIT: I attempted to fix this problem by applying a hotfix named SQLServer2012_RTM_CU1_kb2679368_11_0_2316_x64. It did not fix the problem. The hotfix was suggested by a user in an MSDN forum at this link: http://social.msdn.microsoft.com/Forums/en/sqlexpress/thread/1753d7ba-f6ec-4a8e-a1c9-ded2a5b7c607
I bumped into the same issue. Mine is SQL 2012 in windows7. I was trying connect to a sql server 2014 in Windows 2012 R2.
The problem was resolved after I upgraded my SQL 2012 client to 2014.
It is interesting that it was fine to work with SQL2014 with Windows 2012 but not windows 2012 R2.
For the sake of completeness I added this answer with all steps
required to solve this issue
It is a stupid error, which can occur in nearly all sersion of SQL Server Management Studio.
Look for a machine that had SSMS installed which ist still working without any error.
Copy all files of the folder from the working machine to the faulting machine
Folder 1: C:\Program Files (x86)\Common Files\microsoft shared\Visual Database Tools\
Folder 2: C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\
Start SSMS again and the error is gone
verified for 2008R2, 2012, 2014
I was used to get this message and to get the management closed ALL-THE-TIME
when I notice a pattern in the bug ( and given the message I guessed the bug was isolated when trying to deal with the diagram database objects in the memory), if I create the diagram, place a table, put the first column with pk, save, close and open the diagram again it started working...
I used to repeat this for every new table added in the diagram without saving in disk
somehow, it stopped happening maybe after some updates in the host
I hope it works for you too
I figured out the answer, thanks to another post located here. Basically, even though my visual studio 2012 install was the trial version, it seemed to cause the same problem as the visual studio described in the link. Check it for a workaround.

How to fix Visual Studio's error "This server version is not supported..." for SQL Server 2012

I recently installed Visual Studio 2010 and SQL Server 2012 on a Windows Server 2008 R2 machine - (including all updates/Service Packs).
When attempting to work on a SQL Server database from within Visual Studio, VS throws the following error:
This server version is not supported. Only servers up to Microsoft SQL
Server 2008 are supported
I recall getting this same error a while back (on a different computer) when I updated a SQL Server 2008 instance to SQL Server 2008 R2. The fix, back then, was to install (or reinstall) Visual Studio 2010 SP1.
Now that I'm receiving this error again (on a new computer), I thought it reasonable to reinstall VS SP1 just like I did a while back. However, doing so did not fix the problem.
It appears as though Visual Studio may need another update to support SQL Server 2012 instances.
For clarity, here are the steps that I did to produce the error: (using VS 2010sp1 and SQL2012)
Using VS, create a Windows Forms application
Right-click the project and choose, Add > New Item
Select "Service-based Database"
Cancel out of the "Data Source Configuration Wizard"
A Database will appear under your Project in Solution Explorer. Double-click the new database
The Database will be added to Server Explorer's list of Data Connections
In Server Explorer, open the database, right-click the Tables directory, then select "Add New Table"
The error "This server version is not supported...." is thrown
Screenshots for whatever its worth..
My question is, is there a fix for this? If so, what is it?
Maybe get SQL Server Data Tools, which work with SQL Server 2012? I believe there are some good tutorials and other materials in the Developer Training Kit. I don't think there are any tricks yet to make an older version of Visual Studio / Data Dude compatible with SQL Server 2012.
Following MSDN blog link discusses about the issue that you are facing with local SQL Server database instance in Visual Studio 2010.
Using LocalDB in Visual Studio 2010
My problem was that I couldn't get VS2012 to work right with SQL Server 2012. I installed the latter product first, but after installing VS2012 and attempting to open an existing project, my existing data file just would not work. I know the software is supposed to automatically take you through a wizard to update your database in the project, but that didn't happen, and I couldn't find a way to make it happen. I'm on the point now of getting rid of SQL Server 2012 and going back to 2008. I'd rather use the most current releases, but I can't spend any more time on configuration issues.
I tried reinstalling the SSDT as well, but kept getting the same error you mentioned Jed, this seemed to let me get around the error message:
http://forums.asp.net/t/1721552.aspx/1?Working+with+Denali+SQLEXPRESS+in+VS+11+Database+issue
This error could also occur if you use the wrong provider. A recently came across the "This server version is not supported...." error and after changing the provider from sqlClient Data Provider to SQL Server Native Client 11.0 in the connection string for the Data Source configuration the problem was solved.
For me, the error arises whenever I try creating a new database. So after unsuccessfully attempting all methods advised, I bypassed the error by clicking on "Add connection" and putting my server name in the dialog box. After adding the non-existent database name, it notifies that it can't find such database and asks whether to create it. Voila! Database created (even though server version is supposedly unsupported).

SQL Server 2005 Management finds no database, 2008 won't install

In the past, I installed Visual Studio 2010. With that comes SQL Server.
Now I installed this:Microsoft SQL Server Management Studio Express
Now, upon starting, I get this screen:
And it doesn't matter what Server name I enter, nothing works.
I've tried installing SQL Server 2008 Enterprise(I can get that via MSDNAA), but that fails totally, giving me this error:
TITLE: Microsoft SQL Server 2008 Setup
The following error has occurred:
Unable to open Windows Installer file
'G:\x86\setup\sql_engine_core_inst_loc_msi\1033\sql_engine_core_inst_loc.msi'.
Windows Installer error message: The
system cannot open the device or file
specified. .
Click 'Retry' to retry the failed
action, or click 'Cancel' to cancel
this action and continue setup.
For help, click:
http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.2531.0&EvtType=0xC24842DB
------------------------------ BUTTONS:
&Retry Cancel
There is no help, I can click retry as much as I want, nothing changes. I went to the file itself, and Windows says I should check if it is a valid installer file.
And that's my story. I need to get this up and running, and it's all going against me. Can anyone help?
Oops, I have the same problem [1]!
Though I did not investigate the issue
(since I do not need now VS2010 or SQL Server Express)
You can find helpful the answer to my [2] which was reported helpful to resolve the problem by others.
I am afraid it should be reported as bug to MS Connect, though I do not have time and desire to invest time in investigation. Anyway, when MS teams cannot resolve something they close bugs "by design" or "not reproduced"
Since there is no channel to report bugs on SQL Server 2005 xxx (or VS2008), for which the reports are closed, it should be reported in VS2010 board.
Give link if you report, I shall upvote the bug and mark it as reproduced by one more.
My related questions (having some solutions):
in asp.net "Visual Studio and Visual Web Developer Express " forum, frequently answered by MS teams
[1]
S2010RC setup installs unusable MSSQL2008 Express?
(the same problem as yours, unanswered)
http://forums.asp.net/t/1571173.aspx
[2]
MSSQL2008R2 (BIDS, i.e. VS2008) after VS2010?
(answered and solution is reported to be helpful to others)
http://forums.asp.net/t/1568816.aspx
[3]
to submit bug reports on BIDS 2008 R2 as VS2010 bugs?
http://forums.asp.net/t/1568807.aspx

Resources