Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 job history

Author  Topic 

priyaram
Yak Posting Veteran

82 Posts

Posted - 2005-06-28 : 10:41:39
one of myjob runs once in a month (every 1'st )
to purge the data.

is there anyway i can find out how many records it deleted for last month's run?

thanks

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-06-28 : 10:57:20
After your delete statement use @@ROWCOUNT to get the number of rows deleted or run a SELECT COUNT(*) FROM yourTable before your delete or truncate.

Sean Roussy

Please backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.

I am available for consulting work. Just email me though the forum.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-06-28 : 23:47:24
if it's a job, then you can set up a log file to write the date the job ran and the number of rows affected

or you can create a small table for job history with all the data you need to review like tablename, run date, number of rows, etc

HTH

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -