Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set NOCOUNT OFF at database level?

Can I set NOCOUNT to be OFF by default for a particular database?

I need it for NHibernate (if it's ON, I get exceptions when saving). I can see the setting to disable it for an entire server (where it's set ON), but we're sharing the server with other databases. Is there a way I can set it to OFF just for my database?

Or is there an NHibernate setting that will do this for me? (I've worked around it for now with a custom DriverConnectionProvider that issues the command whenever it creates a connection. Works ok, but feels a bit awkward)

I'm using SQL Server 2000, btw.

Thanks Matt

like image 439
citizenmatt Avatar asked Nov 25 '22 19:11

citizenmatt


1 Answers

no, there is no database wide setting for SET NOCOUNT.

same question: http://www.eggheadcafe.com/software/aspnet/32120672/set-nocount.aspx

like image 158
KM. Avatar answered Nov 28 '22 09:11

KM.