SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Mysterious process running
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rexmism
Starting Member

3 Posts

Posted - 07/23/2009 :  10:44:47  Show Profile  Reply with Quote
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

USA
5072 Posts

Posted - 07/23/2009 :  11:00:28  Show Profile  Visit russell's Homepage  Reply with Quote
- 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

USA
5072 Posts

Posted - 07/23/2009 :  11:02:06  Show Profile  Visit russell's Homepage  Reply with Quote
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 - 07/23/2009 :  11:19:46  Show Profile  Reply with Quote
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 - 07/23/2009 :  11:54:31  Show Profile  Reply with Quote
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

USA
5072 Posts

Posted - 07/23/2009 :  12:18:13  Show Profile  Visit russell's Homepage  Reply with Quote
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.

Edited by - russell on 07/23/2009 12:18:45
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000