December 4, 2005 at 11:57 pm
I would like to check if there is data being currrently saved to a table or database. I thought that the funtion would be @@IO_BUSY, but it doesn't return what I want. Any ideas?
Thanks.
December 5, 2005 at 3:51 am
You could check the syslocks and syslockinfo tables in the master database to see if there are any exclusive locks on the table in question. That would tell you if there's an insert, update or delete occuring on the table.
SQL doesn't write updates immediatly to disk when you do a data modification. The modification is done to pages in memory and written to the disk some time later by one of the system processes.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 5, 2005 at 4:31 am
If actual writing activity in general is wanted, I believe that you could use perfmon for this.. (gotta be some file i/o counters in there, I believe..?)
/Kenneth
December 5, 2005 at 6:44 pm
I'll give it a try. Thanks.
December 6, 2005 at 2:17 am
you can also try with profiler within SQL Server. It basically the same kind of tool as the performer for windows but it can follow all the scripts run at one given time as well as who is doing what (uses sp_who, etc) Profiler is a goods tool and can also give you any kind of error because it follows the raiseerror. Good luck
December 7, 2005 at 3:28 pm
If you are looking for any open transactions, take a look at DBCC OPENTRAN in BOL.
December 9, 2005 at 12:26 am
Exec sp_Locks
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply