Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««12345

Number of Rows Expand / Collapse
Author
Message
Posted Tuesday, January 22, 2013 8:07 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 2,180, Visits: 2,173
venkat9.sql (1/22/2013)
I am a starter in sql server..
Can some one let me know why i dont get the 1 row(s) affected message as stated but simply
Command(s) completed successfully message..


Hello, and welcome to SQL Server Central.

We don't actually execute the code to see the 1 row(s) affected message. There is a button near the top of SQL Server Management Studio that will "Display Estimated Execution Plan". If you click this button two tabs will open up in the results pane, an "Execution plan" tab and a "Messages" tab. If you click on the Messages tab, you will see the 1 row(s) affected message there.

Good luck!
Post #1410055
Posted Tuesday, January 22, 2013 9:18 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, October 16, 2014 2:45 PM
Points: 212, Visits: 233
Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan.
I checked the messages tab and didnt get the 1 row affected message.

I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.

Thanks,
VJ










___________________________________________________________________
If I can answer a question then anyone can answer it..trying to reverse the logic..
Post #1410102
Posted Tuesday, January 22, 2013 9:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:02 PM
Points: 6,133, Visits: 8,396
venkat9.sql (1/22/2013)
Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan.
I checked the messages tab and didnt get the 1 row affected message.

I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.

Thanks,
VJ

Menu-option Query / Query Options ... / Advanced / untick SET NOCOUNT (for current query window only)
Or: menu-option Tools / Options / Query Execution / SQL Server / Advanced / untick SET NOCOUNT (default setting for all new query windows; will not affect windows already open)
Or: Execute "SET NOCOUNT OFF;" (for current query window only; can be used to change setting for parts of a longer batch, but will only work when actually executing the code, not when requesting estimated execution plan)



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1410112
Posted Tuesday, January 22, 2013 9:34 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 2,180, Visits: 2,173
venkat9.sql (1/22/2013)
Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan.
I checked the messages tab and didnt get the 1 row affected message.

I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.

Thanks,
VJ


Thanks for the feedback. Since submitting the question, I have done further testing on a default installation of 2008 R2 SP1 and have been able to duplicate the results. The other poster who had a similar problem mentioned 2008 R2 SP2 so if you are using SP2 also then I think your conclusion must be correct that it's either a version difference or settings issue.

This makes the behavior even more curious to me because I would think the Messages tab involves basic functionality. I would further expect more documentation if any significant changes occurred between versions. Oh well, I guess there's always something new to learn in SQL Server.

Enjoy!
Post #1410114
Posted Tuesday, January 22, 2013 10:24 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:02 PM
Points: 6,133, Visits: 8,396
Dave62 (1/22/2013)
venkat9.sql (1/22/2013)
Thanks for the reply. I didn't execute the code. I just used the display estimated execution plan.
I checked the messages tab and didnt get the 1 row affected message.

I am using 2008R2. I fiddled around ssms to see if I can display the rows affected message. but couldn't find anything. I did see few posts preiously stating that they didnt see the message either. I dont know if its a version difference or if its due to any settings in my ssms.

Thanks,
VJ


Thanks for the feedback. Since submitting the question, I have done further testing on a default installation of 2008 R2 SP1 and have been able to duplicate the results. The other poster who had a similar problem mentioned 2008 R2 SP2 so if you are using SP2 also then I think your conclusion must be correct that it's either a version difference or settings issue.

This makes the behavior even more curious to me because I would think the Messages tab involves basic functionality. I would further expect more documentation if any significant changes occurred between versions. Oh well, I guess there's always something new to learn in SQL Server.

Enjoy!


I already wrote last Friday that showing or suppressing the "xx rows affected" message is an option you can change. See my first message in this topic. In the message just above yours, I explain exactly how to change it.
Nothing curious.



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1410153
Posted Tuesday, January 22, 2013 10:38 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 2,180, Visits: 2,173
Hugo Kornelis (1/22/2013)
... showing or suppressing the "xx rows affected" message is an option you can change. See my first message in this topic. In the message just above yours, I explain exactly how to change it.
Nothing curious.

Ah, setting it is then.

I may have missed the explanation last week amongst some of the less educational responses.

Thank you for adding to the learning value of the discussion!
Post #1410158
Posted Friday, January 25, 2013 12:07 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, December 4, 2014 3:18 PM
Points: 437, Visits: 116
sorry to say, but your question is bogus. I just ran it on my SQL 2008 instance and received no row(s) effected message at all.
default settings. Doesn't even matter if set nocount is off/on. And I tested it with SQL 2012 too. Same results.
The one thing that might be different is I'm using SSMS 2012.




Dennis Parks
MCSE, MCDBA, MCSD, MCAD, MCTS
Post #1411886
Posted Friday, January 25, 2013 2:30 PM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, November 11, 2013 2:35 PM
Points: 673, Visits: 123
+0
Don't like these kind a questions.
Post #1411934
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse