Home All Groups Group Topic Archive Search About

Total row effected for a day



Author
16 Mar 2007 1:57 PM
Chinna Kondaveeti
Hi,
It may sound like crazy! But need to ask this question.

Is there any way I can find out the total rows affected by any of the DML
(S/I/U/D) commands within 24 hours?

Trust me it is not my idea! My management wants to identify the activity in
terms of number of rows effected per database.

I know the global variable @@rowcount can capture the statement level rows
effected. But I do not know how to get the cumulative count of all the
operations happend within a day.

Thanks in advance!

Author
16 Mar 2007 2:29 PM
Tibor Karaszi
I guess you can have a profiler trace (server side), import it into a table and query over that
table...

Show quoteHide quote
"Chinna Kondaveeti" <ChinnaKondave***@discussions.microsoft.com> wrote in message
news:A96FE9BD-E01E-4A3E-AF89-DA4C8800E4B9@microsoft.com...
> Hi,
> It may sound like crazy! But need to ask this question.
>
> Is there any way I can find out the total rows affected by any of the DML
> (S/I/U/D) commands within 24 hours?
>
> Trust me it is not my idea! My management wants to identify the activity in
> terms of number of rows effected per database.
>
> I know the global variable @@rowcount can capture the statement level rows
> effected. But I do not know how to get the cumulative count of all the
> operations happend within a day.
>
> Thanks in advance!
Are all your drivers up to date? click for free checkup

Author
16 Mar 2007 3:47 PM
Chinna Kondaveeti
Thank you for the reply. This sounds like a good idea! Do we need to capture
all the sql statements coming from various clients? What is the counter that
captures just the rows effected? I certainly don't want to cause any server
overhead and disk space issues with trace files.

Thanks for your help!

Show quoteHide quote
"Tibor Karaszi" wrote:

> I guess you can have a profiler trace (server side), import it into a table and query over that
> table...
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "Chinna Kondaveeti" <ChinnaKondave***@discussions.microsoft.com> wrote in message
> news:A96FE9BD-E01E-4A3E-AF89-DA4C8800E4B9@microsoft.com...
> > Hi,
> > It may sound like crazy! But need to ask this question.
> >
> > Is there any way I can find out the total rows affected by any of the DML
> > (S/I/U/D) commands within 24 hours?
> >
> > Trust me it is not my idea! My management wants to identify the activity in
> > terms of number of rows effected per database.
> >
> > I know the global variable @@rowcount can capture the statement level rows
> > effected. But I do not know how to get the cumulative count of all the
> > operations happend within a day.
> >
> > Thanks in advance!
>
>
Author
17 Mar 2007 10:40 AM
Tibor Karaszi
> Do we need to capture
> all the sql statements coming from various clients?

Yes, all of the statements for which you want to count this.

> What is the counter that
> captures just the rows effected?

You have to play around with the events to see which event is best for this. The column you are
looking for is Rowcounts


> I certainly don't want to cause any server
> overhead and disk space issues with trace files.

Nothing is free. Make sure you use a server-side trace and only capture events you really need.
Show quoteHide quote
"Chinna Kondaveeti" <ChinnaKondave***@discussions.microsoft.com> wrote in message
news:52D2032D-02D9-472C-92F7-FEE5B52D1934@microsoft.com...
> Thank you for the reply. This sounds like a good idea! Do we need to capture
> all the sql statements coming from various clients? What is the counter that
> captures just the rows effected? I certainly don't want to cause any server
> overhead and disk space issues with trace files.
>
> Thanks for your help!
>
> "Tibor Karaszi" wrote:
>
>> I guess you can have a profiler trace (server side), import it into a table and query over that
>> table...
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>> "Chinna Kondaveeti" <ChinnaKondave***@discussions.microsoft.com> wrote in message
>> news:A96FE9BD-E01E-4A3E-AF89-DA4C8800E4B9@microsoft.com...
>> > Hi,
>> > It may sound like crazy! But need to ask this question.
>> >
>> > Is there any way I can find out the total rows affected by any of the DML
>> > (S/I/U/D) commands within 24 hours?
>> >
>> > Trust me it is not my idea! My management wants to identify the activity in
>> > terms of number of rows effected per database.
>> >
>> > I know the global variable @@rowcount can capture the statement level rows
>> > effected. But I do not know how to get the cumulative count of all the
>> > operations happend within a day.
>> >
>> > Thanks in advance!
>>
>>

Bookmark and Share