locked
Database SET NOCOUNT option. RRS feed

  • Question

  • Hello, is there a way at the DB level to set a particular user database' SET NOCOUNT option to OFF?

    Thanks in advance.

    Tuesday, February 28, 2017 10:59 PM

Answers

  • No. SET NOCOUNT is a TSQL option to suppress return count message when running queries. It is not a database-level option or setting.

    SET NOCOUNT (Transact-SQL)

    Unless SET NOCOUNT is explicitly set to ON within the query, all queries will return a row count message, along with result set.

    HTH,

     

    Phil Streiff, MCDBA, MCITP, MCSA

    Tuesday, February 28, 2017 11:12 PM

All replies

  • No. SET NOCOUNT is a TSQL option to suppress return count message when running queries. It is not a database-level option or setting.

    SET NOCOUNT (Transact-SQL)

    Unless SET NOCOUNT is explicitly set to ON within the query, all queries will return a row count message, along with result set.

    HTH,

     

    Phil Streiff, MCDBA, MCITP, MCSA

    Tuesday, February 28, 2017 11:12 PM
  • Hi, not afaik at a database level.

    You can although set it to off at the instance level i.e. EXEC sp_configure 'user options', 512;

    • Proposed as answer by philfactor Tuesday, February 28, 2017 11:44 PM
    Tuesday, February 28, 2017 11:13 PM
  • Nice trick, Kevin! I wasn't aware of that one.

    Thanks,


    Phil Streiff, MCDBA, MCITP, MCSA

    Tuesday, February 28, 2017 11:19 PM