I've put attempt #2 up, hopefully this is 99.9% perfect it'll still move the cursor if it's in the middle of a load of whitespace that changes as it doesn't have a reference point, but hopefully it's a rare enough case not to bother you too much!
Shift+F5 should be fixed now too.
The options window closing is very odd - I can't recreate it here, even on slow VMs. On closing the options form Prompt will try to save out the options to their xml files. Do you have your settings files saving anywhere out of the ordinary (e.g. a network drive) or have you remapped your localappdata directory? I'm wondering if this is somehow related to the slowdown you were seeing with the refresh - is that still occurring?
Cool. I have been thinking a bit more on it. I notice that when you right-click in the SSMS query window, there are the options to run current statement or run current batch. Might be overloading to have options to "run to cursor" and "run current batch to cursor". Not sure if there are enough keys on the keyboard to include shortcuts for them using the F5 key (there is still shift-ctrl-F5. I guess there is shift-ctrl-alt-F5 :-) ).
Execute to cursor should be in the latest beta build (6.4.0.300). It's bound to Ctrl+Shift+F5 - you're right that we're running out of space/keyboard shortcuts for all these commands!
We decided it was getting a little bit too cluttered on the right click menu with all these in there, so we've just left execute current statement there and the rest are as keyboard shortcuts.
Hi there, on the 6.4 beta, intellisense seems to not come up for "external" databases without an owner supplied
select * from [table_name] comes up correctly
select * from [database_name].[owner].[table_name] comes up correctly
select * from [database_name]..[table_name] is not recognised at all, but used to work in 6.3
We did put in a fix for resolving the double dot syntax to the default schema so this could have been a knock on from that. For the very basic case of a default schema of dbo it seems to be working for me at the moment:
Could you check what result you get back if you run SELECT SCHEMA_NAME(); both on the external database and the current database?
Very strange,
I'm still not able to recreate it here but I'll have a look through the code and see if I can figure out why they would differ. Thanks for reporting it!
Confirmed that "Format SQL" doesn't move the cursor anymore except when in the middle of several lines of white space which is fine. Don't know why I didn't report this months ago! Thanks for fixing this!
Confirmed that Shift-F5 is fixed as well.
The options window closes fine now. It may have been related to several slow network drives that I use via a VPN. I've noticed file save/open dialogs responding slowly in other apps as well. A reboot fixed the problem.
The latest Aug 1 release .zip file seems to be corrupted. I can get many other zip files to extract fine, but not this one.
<<<EDIT>>>
Let me answer my own question: Avast was stopping it (blindly and silently due to my settings) from extracting. I had to disable Avast for 10 minutes in order to install. The extraction and installation went fine thereafter.
Thanks for the heads up, it does sound odd especially if it let you run the installer afterwards without a problem. We occasionally get our dlls marked as false positives as our obfuscator has been used by some viruses but normally having it digitally signed solves that (which the installer is)
The help link uses our help redirect system which hadn't been set up for 6.4 yet as it's still in beta, I'll have a look into see if we can get it redirecting correctly today. (it should be pointing to http://documentation.red-gate.com/displ ... g+snippets)
Here are two screenshots of the latest Avast software scan log (real-time protection) which was preventing me from installing. Hopefully this might help?
Thanks for the extra info – from the first picture it looks like Avast has marked it as suspicious, I had a quick search online and it seems like a few people have been getting false positives marked as Win32:Evo-gen [Susp].
There's a chance it's just a one off for that specific build but if it's still causing problems when we get closer to releasing a stable build we'll see if Avast can add it to a whitelist.
The second picture looks like the remnants of an old install (under Downloaded Installations) which wasn't digitally signed properly and should be safe to delete.
I am no longer able to get a list of parameters for a procedure when positioned directly after a procedure call or a comma after the last parameter of a procedure call. http://i.imgur.com/Phq5gWk.png
Running 6.4.0.404 (went back to 6.3 to test if that feature was there and it appears it was http://i.imgur.com/W0qVc7H.png)
Thanks for reporting this, it looks like it was broken in 6.4.0.397. We've got a fix for it internally and should be able to get a new build out for you tomorrow.
Thanks,
Aaron.
Edit: This should be fixed in the latest build (6.4.0.449)
I just found a bug in the current release and beta version of SQL Prompt.
The problem is if you have a snippet with the same name as what you have typed. for example:
SELECT MIN(DO<cursor>
At this point the suggestions come up with the snippet highlighted, if I arrow down to select a column, for example "DOE", and hit tab the snippet is inserted instead of the selected column name.
Hi CodantiM,
Thanks for reporting this! I think it's due to where prompt will expand wildcards and snippets when tab is pressed and it's expanding the "do" as a snippet here instead of letting the suggestion popup handle it.
I think I've got a fix for you in this private build (6.4.0.499) if you wouldn't mind giving it a try?
I'm not sure if this is related to SQL Prompt, but I installed the 537 version on the 27th and have had three crashes since then when closing SSMS. I have updated to the latest build, but wanted to report this anyways because I did not see anything in the change log mentioning it.
In the SQL Prompt log, I get this warning message:
01 Sep 2014 06:07:17,217 [1] WARN RedGate.SQLQueryKeeper.TabWatcher - Exception trying to log document information
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.Shell.Interop.IVsPersistDocData'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D5D49C61-1C0B-4EA1-9ADB-A79FB1DBC7B5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_DocData()
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_ObjectKind()
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.<get_ObjectKind>b__2a()
at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method)
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.get_ObjectKind()
at RedGate.SQLQueryKeeper.TabWatcher.LogDocumentInformation(Document document, Boolean documentClosing)
And then once I close the application:
Faulting application name: Ssms.exe, version: 2011.110.5058.0, time stamp: 0x537406e3
Faulting module name: KERNELBASE.dll, version: 6.2.9200.16864, time stamp: 0x531d2be6
Exception code: 0xc0020001
Fault offset: 0x00010f22
Faulting process id: 0x12e4
Faulting application start time: 0x01cfc64cf67abaf2
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 1cbc2309-32cf-11e4-be79-000c295d77cf
Faulting package full name:
Faulting package-relative application ID:
I only have the developer bundle installed, no other extensions. I do not get the Red-Gate exception dialog appearing. The only indicator is SSMS restarting.
Edit: well, I may be going crazy. I'm in the middle of rebuilding my development machine VM and this error cropped up on the new machine. The crash shows up in the Event log on the old VM, but I don't remember seeing it. I think maybe I have it configured to not restart crashed applications.
Thanks for letting us know about this.
Unfortunately we're not able to recreate this locally at the moment so to help us in recreating it I wanted to check which version of windows you're running and also which .Net frameworks are installed on your VM?
Also, can you think of anything else that we might need to do to trigger it here? Maybe connecting to a specific server or running multiple instances of SSMS?
Comments
Shift+F5 should be fixed now too.
The options window closing is very odd - I can't recreate it here, even on slow VMs. On closing the options form Prompt will try to save out the options to their xml files. Do you have your settings files saving anywhere out of the ordinary (e.g. a network drive) or have you remapped your localappdata directory? I'm wondering if this is somehow related to the slowdown you were seeing with the refresh - is that still occurring?
Thanks,
Aaron.
Execute to cursor should be in the latest beta build (6.4.0.300). It's bound to Ctrl+Shift+F5 - you're right that we're running out of space/keyboard shortcuts for all these commands!
We decided it was getting a little bit too cluttered on the right click menu with all these in there, so we've just left execute current statement there and the rest are as keyboard shortcuts.
select * from [table_name] comes up correctly
select * from [database_name].[owner].[table_name] comes up correctly
select * from [database_name]..[table_name] is not recognised at all, but used to work in 6.3
Is this a known issue?
Thanks
We did put in a fix for resolving the double dot syntax to the default schema so this could have been a knock on from that. For the very basic case of a default schema of dbo it seems to be working for me at the moment:
Could you check what result you get back if you run SELECT SCHEMA_NAME(); both on the external database and the current database?
Thanks,
Aaron.
I get "NULL"
NULL should be defaulting to dbo, and just to double check do you get different suggestions if you have:
select * from [database_name].[dbo].<cursor here>
compared to
select * from [database_name]..<cursor here>
I get the normal list of tables if I do this (works as expected)
I only get the prompt for snippets here
I'm still not able to recreate it here but I'll have a look through the code and see if I can figure out why they would differ. Thanks for reporting it!
Confirmed that Shift-F5 is fixed as well.
The options window closes fine now. It may have been related to several slow network drives that I use via a VPN. I've noticed file save/open dialogs responding slowly in other apps as well. A reboot fixed the problem.
Could you give the latest beta (6.4.0.397) a try and see if it fixes the missing suggestions with a double dot for you?
Thanks,
Aaron.
Hi Aaron, yes this fix has done the job - intellisense across databases now works as before and as expected.
Many thanks!
Nigel
<<<EDIT>>>
Let me answer my own question: Avast was stopping it (blindly and silently due to my settings) from extracting. I had to disable Avast for 10 minutes in order to install. The extraction and installation went fine thereafter.
In Snippet Manager, edit a snippet. Then click "Find out more" at the bottom of the form. I get a new browser window with a 404 page.
Thanks for the heads up, it does sound odd especially if it let you run the installer afterwards without a problem. We occasionally get our dlls marked as false positives as our obfuscator has been used by some viruses but normally having it digitally signed solves that (which the installer is)
The help link uses our help redirect system which hadn't been set up for 6.4 yet as it's still in beta, I'll have a look into see if we can get it redirecting correctly today. (it should be pointing to http://documentation.red-gate.com/displ ... g+snippets)
Edit: Should be fixed now!
Here are two screenshots of the latest Avast software scan log (real-time protection) which was preventing me from installing. Hopefully this might help?
Picture1
Picture2
There's a chance it's just a one off for that specific build but if it's still causing problems when we get closer to releasing a stable build we'll see if Avast can add it to a whitelist.
The second picture looks like the remnants of an old install (under Downloaded Installations) which wasn't digitally signed properly and should be safe to delete.
Running 6.4.0.404 (went back to 6.3 to test if that feature was there and it appears it was http://i.imgur.com/W0qVc7H.png)
Thanks for reporting this, it looks like it was broken in 6.4.0.397. We've got a fix for it internally and should be able to get a new build out for you tomorrow.
Thanks,
Aaron.
Edit: This should be fixed in the latest build (6.4.0.449)
The problem is if you have a snippet with the same name as what you have typed. for example:
SELECT MIN(DO<cursor>
At this point the suggestions come up with the snippet highlighted, if I arrow down to select a column, for example "DOE", and hit tab the snippet is inserted instead of the selected column name.
Thanks for reporting this! I think it's due to where prompt will expand wildcards and snippets when tab is pressed and it's expanding the "do" as a snippet here instead of letting the suggestion popup handle it.
I think I've got a fix for you in this private build (6.4.0.499) if you wouldn't mind giving it a try?
Thanks,
Aaron.
Thank you very much for the quick fix, it does indeed fix the problem for me.
In the SQL Prompt log, I get this warning message:
01 Sep 2014 06:07:17,217 [1] WARN RedGate.SQLQueryKeeper.TabWatcher - Exception trying to log document information
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.Shell.Interop.IVsPersistDocData'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D5D49C61-1C0B-4EA1-9ADB-A79FB1DBC7B5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_DocData()
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_ObjectKind()
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.<get_ObjectKind>b__2a()
at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method)
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.get_ObjectKind()
at RedGate.SQLQueryKeeper.TabWatcher.LogDocumentInformation(Document document, Boolean documentClosing)
And then once I close the application:
Faulting application name: Ssms.exe, version: 2011.110.5058.0, time stamp: 0x537406e3
Faulting module name: KERNELBASE.dll, version: 6.2.9200.16864, time stamp: 0x531d2be6
Exception code: 0xc0020001
Fault offset: 0x00010f22
Faulting process id: 0x12e4
Faulting application start time: 0x01cfc64cf67abaf2
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 1cbc2309-32cf-11e4-be79-000c295d77cf
Faulting package full name:
Faulting package-relative application ID:
I only have the developer bundle installed, no other extensions. I do not get the Red-Gate exception dialog appearing. The only indicator is SSMS restarting.
Edit: well, I may be going crazy. I'm in the middle of rebuilding my development machine VM and this error cropped up on the new machine. The crash shows up in the Event log on the old VM, but I don't remember seeing it. I think maybe I have it configured to not restart crashed applications.
Thanks for letting us know about this.
Unfortunately we're not able to recreate this locally at the moment so to help us in recreating it I wanted to check which version of windows you're running and also which .Net frameworks are installed on your VM?
Also, can you think of anything else that we might need to do to trigger it here? Maybe connecting to a specific server or running multiple instances of SSMS?
Thanks,
Aaron.
does not put the semicolon in the right place
I just gave it a go and I get the semicolon at the end of the statement (which I think is correct):
Are you seeing something different?
Thanks,
Aaron.
exec dbo.test @test= 1; with recompile