-4

I installed this third party thingy, sp_Blitz.

sqlcmd -S localhost -U sa -i ./sp_Blitz.sql

But when I run

1> EXEC sp_blitz;
2> go

I get,

Warning: Null value is eliminated by an aggregate or other SET operation
Msg 1934, Level 16, State 1, Server x230, Procedure sp_blitz, Line 4338

INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

Error in screen

Attempts at the server

When I try to configure QUOTED_IDENTIFIER I get,

1> sp_configure 'QUOTED_IDENTIFIER';
2> GO
Msg 15123, Level 16, State 1, Server x230, Procedure sp_configure, Line 62
The configuration option 'QUOTED_IDENTIFIER' does not exist, or it may be an advanced option.

That's having previously run sp_configure 'show advanced options', 1; RECONFIGURE;

Attempts at the client

sqlcmd.exe

Ok.. So sqlcmd.exe's docs say

-I Sets the SET QUOTED_IDENTIFIER connection option to ON. By default, it is set to OFF. For more information, see SET QUOTED_IDENTIFIER (Transact-SQL).

However, running with -I will show SESSIONPROPERTY('QUOTED_IDENTIFIER') as 1 but it doesn't seem to work either

sqlcmd -S localhost -U Sa -I
Password: 
1> EXEC sp_blitz;
2> GO
Warning: Null value is eliminated by an aggregate or other SET operation.
Msg 1934, Level 16, State 1, Server x230, Procedure sp_blitz, Line 4338
INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

mssql-cli

This starts up with SESSIONPROPERTY('QUOTED_IDENTIFIER') set to 1 by default, but it generates the same error as above.

0

1 Answer 1

3

sqlcmd.exe's docs say

-I Sets the SET QUOTED_IDENTIFIER connection option to ON. By default, it is set to OFF. For more information, see SET QUOTED_IDENTIFIER (Transact-SQL).

The solution running it in sqlcmd (recreate the stored proc with -I),

sqlcmd -S localhost -U sa -I -i ./sp_Blitz.sql

Like this,

enter image description here

You may need to recreate the proc. I would recommend you run it on SSMS because you will get an ugly format result

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.