Search

SSMS 2012 generates stray queries on single keypress by Erland Sommarskog

Closed
as Duplicate Help for as Duplicate

16
0
Sign in
to vote
Type: Bug
ID: 708296
Opened: 11/24/2011 2:19:50 PM
Access Restriction: Public
0
Workaround(s)
6
User(s) can reproduce this bug
Using Profiler I can see that if make any action in SSMS, two queries are executed. One seems to be from the same connection as the query window, whereas the other is a separate login, which is non-pooled. "Any action" means for instance just clicking with the mouse in the query window or typing a single character.

There is a second ramification of this bug. Assume that you have a messed-up network,
so that the connection takes long time. Then SSMS freezes and is not responding for a
considerable period of time.
Details (expand)

Product Language

English

Version

SQL Server 2012 RC0

Category

Tools (SSMS, Agent, Profiler, Migration, etc.)

Operating System

Windows 7 Professional (SP1)

Operating System Language

US English

Steps to Reproduce

Start SSMS and open a query window to an instance. Start a Profiler instance against the same instance. Click in the query window.

Actual Results

Audit Login Microsoft SQL Server Management Studio - Query Sommar NATSUMORI\Sommar 952 56 2011-11-24 23:18:07.850
SQL:BatchStarting select is_federation_member from sys.databases where name = 'master'
SQL:BatchCompleted select is_federation_member from sys.databases where name = 'master'
Audit Logout Microsoft SQL Server Management Studio - Query
SQL:BatchStarting DECLARE @edition sysname; SET @edition = cast(SERVERPROPERTY(N'EDITION') as sysname); select case when @edition = N'SQL Azure' then 2 else 1 end as 'DatabaseEngineType'
SQL:BatchCompleted DECLARE @edition sysname; SET @edition = cast(SERVERPROPERTY(N'EDITION') as sysname); select case when @edition = N'SQL Azure' then 2 else 1 end as 'DatabaseEngineType'

Expected Results

No queries should be executed.

Platform

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by pl80 on 12/21/2011 at 12:37 AM
This also destroys any ability to determine the last query executed by a SSMS 2012 session. No mather what, that query always is:

DECLARE @edition sysname; SET @edition = cast(SERVERPROPERTY(N'EDITION') as sysname); select case when @edition = N'SQL Azure' then 2 else 1 end as 'DatabaseEngineType'
Posted by jyao on 12/14/2011 at 11:29 AM
Indeed, it is so frustrating (i.e. the slowness) that I have to stop using the SSMS of this version. Why cannot you just put a hot fix as this simply makes peoople who really want to use the product give up and stop using it in daily work.

Jeff
Posted by Microsoft on 12/14/2011 at 2:13 AM
Hi:

This issue has been fixed, and has been verified internally. This should be available in the next available public release of SQL Server.

Thanks for writing in to Microsoft.

Thanks,
Noor
Posted by pl80 on 12/6/2011 at 11:54 PM
The error listed below happens if you're connected from the SSMS 2012 to SQL Server 2008 or older.
Posted by pl80 on 12/6/2011 at 11:52 PM
This also can (depending on the 'events' choosen) generate several errors in the Profier:

Exception
Error: 207, Severity: 16, State: 1

User Error Message
Invalid column name 'is_federation_member'.
Posted by Microsoft on 12/5/2011 at 6:00 AM
Hi Erland,

Thanks for reporting this issue. We have fixed this issue in the next release. Now we cache the required values during editor creation, instead of sending out multiple queries.

I'm resolving this bug as a duplicate of the one we had internally raised.

Thanks,
Prashant.
(prashant.choudhari@microsoft.com)
Posted by Microsoft on 12/1/2011 at 11:39 PM
Hi Erland,

Thanks for reporting the issue. We are looking into the issue and I will update the status of the issue after the investigations complete.

Regards,

Ambrish
Sign in to post a workaround.