|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Total row effected for a day
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! I guess you can have a profiler trace (server side), import it into a table and query over that
table... -- Show quoteHide quoteTibor 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! 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! > > > Do we need to capture Yes, all of the statements for which you want to count this.> all the sql statements coming from various clients? > What is the counter that You have to play around with the events to see which event is best for this. The column you are > captures just the rows effected? looking for is Rowcounts > I certainly don't want to cause any server Nothing is free. Make sure you use a server-side trace and only capture events you really need.> overhead and disk space issues with trace files. -- Show quoteHide quoteTibor 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: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! >> >>
Other interesting topics
|
|||||||||||||||||||||||