MS SQL issues

After using 0xDBE for a while there are a few things I have noticed with MSSQL - these may or may not be known issues, I don't have time to check right now.

RAISERROR (@Msg, 0, 1) WITH NOWAIT

...does not print immediately, but only when execution of the full script block ends.

Scripts that should be executed as a whole, such as Ola Hallengren's maintenance script, or Adam Machanic's WhoIsActive:

https://ola.hallengren.com/scripts/MaintenanceSolution.sql
http://sqlblog.com/files/folders/beta/entry42453.aspx

...throw errors when executed in 0xDBE. This appears to be an issue with 0xDBE not properly supporting the GO for separation of batches. A quicker example:

DECLARE @Test INT;
SET @Test = 1;
PRINT @Test;
GO
DECLARE @Test VARCHAR(1);
SET @Test = '1';
PRINT @Test;
GO

In SSMS it prints as expected, in 0xDBE you get:

[2014-11-13 10:16:45] [S1000][134] The variable name '@Test' has already been declared. Variable names must be unique within a query batch or stored procedure.

This makes 0xDBE fairly limited for writing and executing more complex scripts.

There also appears to be some sort of issue with temporary tables and modifying them between executions of a block like IF OBJECT_ID...IS NULL DROP TABLE #Temp / CREATE TABLE. I've often run into situtations where if I add or modify a column in that temp table it will throw an error instead of executing the DROP the next time I run it. It won't work until I specifially drop the table outside of the code block manually, and then it will execute fine without any other changes. I haven't been able to isolate this behaviour enough to re-create it though.

1
1 comment

Thank you. Created:
https://youtrack.jetbrains.com/issue/DBE-969
https://youtrack.jetbrains.com/issue/DBE-970

The last issue requires a bit of play around, will do it later. If you can provide a sample script to demonstrate the problem, please do.

Regards,
Alexander.

0

Please sign in to leave a comment.