MS SQL issues Follow
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:
...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;
DECLARE @Test VARCHAR(1);
SET @Test = '1';
In SSMS it prints as expected, in 0xDBE you get:
[2014-11-13 10:16:45] [S1000] 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.
Please sign in to leave a comment.
Thank you. Created:
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.