Instance validation error: 'Window Spool' is not a valid value for PhysicalOpType

Get the error when trying to view execution plan on the following code: (looking for a work-around to get a real execution plan to come up)  INSTRUCTIONS: Paste code below in SQL Server MANAGEMENT Studio 2012 (SP2 11.0.5288).  Do not run; however, hold down your control key and touch the letter "L" [CTRL-L] to reproduce error in TITLE.  Thanks.

DECLARE @tmp TABLE(ID INT IDENTITY(1,1) NOT NULL, FKID INT NOT NULL)
INSERT INTO @tmp values(1)
INSERT INTO @tmp values(1)
INSERT INTO @tmp values(1)
INSERT INTO @tmp values(1)
INSERT INTO @tmp values(1)
INSERT INTO @tmp values(1)
INSERT INTO @tmp values(2)
INSERT INTO @tmp values(2)
INSERT INTO @tmp values(2)
INSERT INTO @tmp values(2)
INSERT INTO @tmp values(2)
INSERT INTO @tmp values(2)
SELECT fkid,id FROM @tmp WHERE fkid=1
SELECT
fkid
,id
,previous_id= LAG(id)OVER(partition BY fkid ORDER BY fkid,id)
,nextid=LEAD(id)OVER( PARTITION BY fkid ORDER BY fkid)
FROM
(SELECT fkid,id FROM @tmp WHERE fk

March 28th, 2015 2:29pm

i think your ssms is not sql 2012.

i checked in ssms 2012 and it works fine.

i checked in ssms 2008r2 and it come back with the error you mentioned

check this --  in SSMS - on the top  -- HELP ----ABOUT --- check the management studio version..

Free Windows Admin Tool Kit Click here and download it now
March 28th, 2015 2:41pm

I deliberately included the version in the original 11.0.5288  (found with Select @@version)
March 28th, 2015 4:31pm

Good day,

Using SSMS 2014 connecting to SQL Server 2014

You get that it is OK

Using SSMS 2008r2 connecting to SQL Server 2014, you get this error:

An error occurred while executing batch. Error message is: Error processing execution plan results. The error message is:
There is an error in XML document (1, 46253).
Instance validation error: 'Window Spool' is not a valid value for PhysicalOpType.

Using SSMS 2008r2 connecting SQL Server 2008r2 you will get this error:

Msg 195, Level 15, State 10, Line 21
'LAG' is not a recognized built-in function name.
Msg 102, Level 15, State 1, Line 24
Incorrect syntax near 'x'.

You should use SSMS 2012 and above :-)

* my guess is that you are using SQL Server 2012 but SSMS 2008r2 or before. Therefore select @@VERSION give you 11
** I tested it now and this is the behaviour that

Free Windows Admin Tool Kit Click here and download it now
March 28th, 2015 4:44pm

That's a bit confusing.  I thought version 11.0.5288 was a patched SP2 of SQL 2012 that includes #10 and #11.

https://technet.microsoft.com/en-us/library/security/ms14-044.aspx?f=255&MSPPError=-2147217396

March 28th, 2015 5:14pm

I deliberately included the version in the original 11.0.5288  (found with Select @@version)

That's the version of the engine. The version of SSMS you find in Help->About.

Free Windows Admin Tool Kit Click here and download it now
March 28th, 2015 5:23pm

Apologies.  I'm still confused because the SQL did upgrade to 2012.  Database compatibility level is SQL Server 2012 (110).   So it isn't the version of the database engine that determines whether it works or not; instead, it is the version of the SSMS performing the query.

Thanks, I see why I get the error now.   Some of the laptops, mine being one of them, haven't been fully upgraded.

It's not just the engine needed at that level.  Cleared that up.

March 28th, 2015 5:38pm

Hi,

The SQL Server and the SSMS are not directly related in this issue. the SSMS is just a tool to manage the SQL Server. I am using other client app instead of the SSMS, for example Web application using browser (I have my Web Application that is called Ariely SQL Management Studio and it is look and feel almost like the SSMS, but it is web app using the browser), there are several portable applications like the 'heidisql' or 'database browser' (which allow me to connect to MySQL,SQL Server,and other servers all in one window).

These are just tools, and we can install the SSMS with or without the SQL Server, on the same machine or in remote machine. This is external application, even so it is in the same installation disk :-)

Therefore you can use SSMS in one version and connect to SQL Server from another version.

Upgrade the SQL Server do not upgrade the SSMS if you did not chose it

Free Windows Admin Tool Kit Click here and download it now
March 28th, 2015 6:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics