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 2005 Forums
 SQL Server Administration (2005)
 SysProcesses login time

Author  Topic 

wavemachine
Starting Member

3 Posts

Posted - 2008-04-01 : 17:50:48
Hi,

We have written various applications that have a connection table for managing users logins, we have a connect stored proc that inserts the SIPD and the login time from sysprocesses.

From time to time we clean up our connections table by queryng against the SPID and login_time in sysprocesses and clear it if these don't match. This has been fine for a few years, howver we have found recently with a client that with some SPID's in sysprocesses that SQL server is changing the login time, this is unexpected behaviour.

The client is using SQL server 2005 and this has caused us problems, we have worked around it for now but wondered if anyone new why on this particular setup why the login time would change even though they have not disconnected.

We have other clients using SQL 2005 but have never seen this issue before, I wondered if there was a setting we have not seen that can cause this.

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2008-04-01 : 22:20:23
Are you sure you're getting the login time from the main thresd for the spid?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

wavemachine
Starting Member

3 Posts

Posted - 2008-04-02 : 01:33:00
We are querying on the SPID so are you saying there can be multiple entries for a single SPID?

If this is the case then it could be why our connections are mysteriously being wiped from the connection table.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2008-04-02 : 02:18:39
yes ecid = 0 is the root thread for the spid.
It can spawn extra threads for parallelism which will have different ecid sequence numbers.
I don't know what the login times on the other entries are but you should only be interested in ecid=0.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

wavemachine
Starting Member

3 Posts

Posted - 2008-04-02 : 02:29:47
Thanks nr,

I will investigate that, certainly makes sense now as to why problems were occuring.
Go to Top of Page
   

- Advertisement -