Sql Refactor crashes SSMS on this query
SvdSinner
Posts: 13
If I attempt to use Layout SQL or Uppercase Keywords from Sql Refactor for the following query, SSMS locks up.
FWIW, the above query parses correctly in TSQL and returns the expected results.
Is this a bug, or do I have a problem with my install?
WITH CurrentQuery AS ( SELECT * FROM dbo.spf_GetEntireEntryPointHierarchy(1) ), Orphans AS ( SELECT * FROM CurrentQuery WHERE parentid NOT IN (SELECT id FROM CurrentQuery) AND parentId > 1 ) SELECT * FROM orphans
FWIW, the above query parses correctly in TSQL and returns the expected results.
Is this a bug, or do I have a problem with my install?
The Pragmatic TSQL Programmer
http://www.solidrockstable.com/blogs/PragmaticTSQL
http://www.solidrockstable.com/blogs/PragmaticTSQL
Comments
I have tried using the query you submitted and haven't found any problems with SQL Refactor. May I ask which version of SQL Refactor, SSMS and Windows you are using?
Regards,
Jonathan
-Project Manager
-Red Gate Software Ltd
http://www.solidrockstable.com/blogs/PragmaticTSQL
I take it that this occurs 100% of the time on this file? I know it sounds strange can you copy the text to a new file and try to reformat it again and see if that makes a difference?
Also are you able to email me your layout options file?
Regards,
Jonathan
-Project Manager
-Red Gate Software Ltd
Any suggestions? I'm just about to head into Code Review week (next week) and I don't want to even think about not being able to use my Red Gate tools.
http://www.solidrockstable.com/blogs/PragmaticTSQL
From they way you are talking I gather than SQL Refactor had been working fine, until you noticed this problem with the above query and now things have got worse?
Can you be a bit more specific, are you referring to any SQL when you use the Layout SQL command or are other commands like Smart Rename, Split table, Uppercase keywords, Find unused variables, etc. also affected?
Have you installed any applications or service packs recently?
Regards,
Jonathan
-Project Manager
-Red Gate Software Ltd
http://www.solidrockstable.com/blogs/PragmaticTSQL
I had a chat with our developers on Friday:
Do you use Prompt? If so is that showing the same problem?
Also I am informed that Management studio has an issue where it will hang for 30 seconds to 1 minute if we don’t return control to the UI for 10 seconds or more: you can see this happen if you Refactor a very large file. In this case, control does eventually return. How long have you been waiting before deciding Management Studio is hung?
Regards
Jonathan
-Project Manager
-Red Gate Software Ltd
I tried this weekend to see if SSMS would ever return control back to the user, but even after letting it be locked up for > 24 hours, it never returned control back.
Normally, when software gets buggy like this I reinstall, but as I mentioned, I've already done that and it hasn't improved.
http://www.solidrockstable.com/blogs/PragmaticTSQL
Do you use SQL Refactor as the same user who installed the application?
Jonathan
-Project Manager
-Red Gate Software Ltd
I was the user who installed it, and it is installed under my user account.
Please let me know what I can do to get this functioning again.
http://www.solidrockstable.com/blogs/PragmaticTSQL
As I said, this has never happened until the last couple of weeks and now is happening enough times a week that I am almost afraid to use Refactor.
Tim
Denver, CO
You’ll need to uninstall SQL Refactor, SQL Prompt and then SSMS. Then delete the following registry keys before you attempt to reinstall:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{EAD9E428-F0B0-417C-9624-BB7CB0EF2B9B}
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\90\Tools
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools
When you reinstall try installing just SQL Refactor and not SQL Prompt at first, just in case his problem is due to a clash between the two programs.
Regards,
Jonathan
-Project Manager
-Red Gate Software Ltd
As a consultant that is getting paid for productive hours this is a bigger cost than it is worth. Back to hand formatting and will consider my support renewal as a donation to Red Gate.
Tim
Denver, CO
I have SQL Prompt installed, but no problem there at all
see the topic I created
http://www.red-gate.com/messageboard/vi ... php?t=6409
Red Gate has opened a support ticket for me, let's hope it leads to somewhere
I have had to kill SqlWb.exe 5~10 times today after Refactor stalls
DBA, MCITP