[This topic is migrated from our old forums. The original author name has been removed]
If I have the Max Rows option set in SQL Commander, and attempt an Explain Plan against a MS SQL 2005 server, an error is generated (SQL2005 only, SQL2000 works fine):
"Failed to enable explain mode. The SET SHOWPLAN statements must be the only statements in the batch."
It appears that the SET ROWCOUNT and SET SHOWPLAN_ALL ON are being sent in the same batch, as in:
SET ROWCOUNT 1000 SET SHOWPLAN_ALL ON SET ROWCOUNT 0
Disabling the Max Rows option (-1) eliminates the error, but is there a way to modify the SET commands being sent to:
SET ROWCOUNT 1000 go SET SHOWPLAN_ALL ON go SET ROWCOUNT 0 go
[This reply is migrated from our old forums. The original author name has been removed]
Re: Explain plan error on MSSQL 2005
Problem seems to have been solved with 5.1.1.3. Tracing the executed SQL, I no longer see SET ROWCOUNT being executed with an Explain Plan.
Roger Bjärevall
said
over 17 years ago
[This reply is migrated from our old forums.]
Re: Explain plan error on MSSQL 2005
Matt,
Try the latest early access version (just released).
http://www.minq.se/products/dbvis/eap
(It is untested since we cannot reproduce the problem here).
Regards
Roger
a
anonymous
said
over 17 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Explain plan error on MSSQL 2005
MS SQL 9.00.3027
Microsoft SQL Server 2005 JDBC Driver 1.1.1501.101
Roger Bjärevall
said
over 17 years ago
[This reply is migrated from our old forums.]
Re: Explain plan error on MSSQL 2005
Matt,
What version of the JDBC driver are you using?
I just tried with the following and don't get the problem:
Microsoft SQL Server
9.00.2047
Microsoft SQL Server 2005 JDBC Driver
1.0.809.102
Regards
Roger
anonymous
"Failed to enable explain mode. The SET SHOWPLAN statements must be the only statements in the batch."
It appears that the SET ROWCOUNT and SET SHOWPLAN_ALL ON are being sent in the same batch, as in:
SET ROWCOUNT 1000
SET SHOWPLAN_ALL ON
SET ROWCOUNT 0
Disabling the Max Rows option (-1) eliminates the error, but is there a way to modify the SET commands being sent to:
SET ROWCOUNT 1000
go
SET SHOWPLAN_ALL ON
go
SET ROWCOUNT 0
go