how to handle phantom processes

how to handle phantom processes

Post by Monhal » Tue, 03 Feb 1998 04:00:00

I have seen many discussions on this topic in this group.  Running 11.0.2
and 11.0.3, what is the best way to handle phantom processes?  Is it
possible to prevent processes from becoming "phantom" in the first place?


1. Phantom SQL Server Process Locks My App

I'm using Borland C++ Builder 4 and its TQuery component to try to work with
a SQL Server 7.0 database via ODBC from Win98.  My goal is to completely
delete and then repopulate four tables (from external flat files) so that no
one can do anything with these four tables while they're loading.  My
approach is the following:

Create four TQuery objects all using the same database.
Use one of the TQuery objects to execute the following:
    "set transaction isolation level serializable"
    "begin transaction"
Use each TQuery object to "delete from <table>" in turn.
Prepare a different "insert" statement in each of the four TQuery objects.
Process the flat files, inserting as you go.
Use one of the TQuery objects to "commit work".

The deletion of the four tables goes fine, but when the first (or something
close to the first) "insert" statement is run, the process hangs.  Looking
at the SQL Server Enterprise Manager, I see that there are more than one
"spid" processes accessing my database (typically, three [I think]).  One
spid is WAITing for a table lock, held by another, to be released.

Shouldn't there be only one SQL Server process running?  How can a single
database connection wait for itself?  Shouldn't all four prepared statements
share the same spid?

Thanks for any assistance you can render!

2. SQL Database Programmer / Designer - SF east bay, CA (Rec)

3. Phantom dbsnmp processes?


5. ghost/phantom processes

6. Oracle/Sybase developers

7. NT 3.5 phantom processes

8. help! this is beginning to annoy me....

9. Reproducing phantom processes

10. Phantom processes

11. NT SQLServer/Named Pipes/Phantom Processes

12. Kill a Phantom Process in Universe

13. Convert To Phantom Process - D3 Aix