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)
 Mysterious process running

Author  Topic 

rexmism
Starting Member

3 Posts

Posted - 2009-07-23 : 10:44:47
Hello,
I've been trying to pin down the interworkings of an import process into our SQL 2000 database, but the last step is happening very mysteriously. Basically, 20 or 30 seconds after some data is inserted into a table, the record disappears, the data is populated to other tables as needed, and a record is written to a log table. Foregoing the rest of the import process, I can simply insert a record into this table with random data, and then after a bit it's been processed automatically. I immediately thought trigger, but the only one on this table is just removing extra spaces, so I can't figure out what on earth is doing this and where the code is. Anyone have any ideas?
Thanks,
Matt

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-23 : 11:00:28
- look for SQL Agent jobs.
- Execute sp_who2 to see who's connected
- Use profiler if these don't find it
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-23 : 11:02:06
or capture this info in a trigger

select SYSTEM_USER, host_name(), APP_NAME(), user_name()
Go to Top of Page

rexmism
Starting Member

3 Posts

Posted - 2009-07-23 : 11:19:46
When I run sp_who2, I see a process flicker from sleeping to background and then back to sleeping very quickly after inserting a record into the table, so I'm pretty sure that's what's doing it. But there are only a handful of jobs I see under SQL Server Agent. None of them are doing this, and I've turned them all off anyway. How can I find this job?
Go to Top of Page

rexmism
Starting Member

3 Posts

Posted - 2009-07-23 : 11:54:31
Okay, I looked at Process Info under Current Activity and notice that a lot of processes run after inserting a record. The question now is, how are these processes created and ran?
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-23 : 12:18:13
put a trigger on the log table, to capture the info i mentioned above -- have it insert that info to another table, then insert a record.

then u can drop the new trigger.

this will point u in the right direction.

or u can fire up profiler, run an insert and see what's happening.
Go to Top of Page
   

- Advertisement -