Sp_who
Jul 17, 2002Hi!
I want schedule a job to run sp_who at 5 a.m.
How can I save the sp_who result to check it later.
Thank you,
Elena
Hi!
I want schedule a job to run sp_who at 5 a.m.
How can I save the sp_who result to check it later.
Thank you,
Elena
Hi,
How can I save result of sp_who into temp table or variables?
Thank you,
Elena
Is there any way to write a line to a table showing who had a lock at a particular time?
We have a need to rollback transactions that persist for too long and cause application errors. what i want to do is to dump the details of the connection into a table for analysis later.
i am thinking along the lines of
SELECT loginname
FROM sp_who
WHERE spid in
(
SELECT spid
FROM sp_lock
)
or something!!!!
any ideas anyone?
Hi!
I need some examples of SP_Lock & SP_Who.
Best Regards,
Shabber Abbas Rizvi.
I have some users on Citrix, running an Access front end with ODBCattached tables.In sp_who. on a normal workstation they'd usually show once or maybemore but all with the same hostname so counting actual number of usersis easy, group on loginame,hostname.When someone connects from a Citrix server, I append the connectionnumber to the workstation name in the connect string so the hostnamelooks something like "CITRIXBOXICA-tcp#256" also for terminal servicesthe hostname will look like "GANDALFRDP-Tcp#8".The problem is that on Citrix the user appears twice with a differenttcp number, the hostname is made up of the name of the citrix/ts server+ the environment variable %SESSIONNAME%, which is surely static for asession?Has anyone seen this in Citrix? Does it ghost old connections? I loogedout and in again just now and saw the sessions look like:CITRIXBOXICA-tcp#199 & CITRIXBOXICA-tcp#254 for my user name thenafter re-logging on I got CITRIXBOXICA-tcp#199 & CITRIXBOXICA-tcp#256so that session 199 has stuck there but wasn't visible in sp_who whilenot logged into the Citrix box.
View 1 Replies View RelatedHi,
Beside sp_who which shows the number of connections to databases,
is there any other sp that shows us the starting time for each connection because the
sp_who does not show the starting of the connection.
Thanks.
Hi,
I'm using SQL SERVER 7.0. When I do sp_who from Query Analyser to see who has processes running, I get three statuses on the processes, 'runnable', 'background', 'sleeping'.
I can't find anywhere in books, BOL, anywhere that tells me a definition of what each of these statuses mean.
Can anyone help me out?
Thanks,
Darrin
Dear All,
i've a doubt regarding the difference between sp_who and sp_who2.
i've read in one article stating that sp_who is documented and sp_who2 is un documented.what is meant by this?
and please provide me the articles related to locks(what are different types of locks)
thank you very much
Vinod
Even you learn 1%, Learn it with 100% confidence.
Hello All,
I need to find out which user are connected to a What database. For this I can Use SP_WHo. But How can i fetch the required fields only dat too in Query Analyzer
Thank you in advance
Hello 2 all,Maybe my question can be very stupid, but I'm a little confused.When I run sp_who on my database, I see one process (accessing remotelymy database from another database on another SQL server) many manytimes.Well, I assume that this is one process, because I cannot imagin thatthe data aquiring can be done by almost 1000 (thousand) openedconnections.This is what I have. Almost 1000 spids running (sleeping) with cmd =awaiting command.The best part is, that when I run sp_lock, I see, that the currentsession of the client, (lets say spid 53) is locking tempdb, withobjects id below 10 (system).As far as i know, and as far as I'm using this in my software, there isno necessity to open-close-open-close connection.Normaly, you can just open a connection to db, with assigned spid, andoperate within this just one. After the disconect ist done, the sessionshoould be removed.I think, there is something wrong in the way, the remote system isconnecting to my database, but i'm not sure is it normal what I'mexpieriencing or not.below, a piece of that what sp_who returned:SPIDECIDstatusloginnamehostnameblkdbnamecmd2660sleeping remote_user_namehost_ERP 0PRIMARY_PROCESS_DBAWAITING COMMAND2670sleeping remote_user_namehost_ERP 0PRIMARY_PROCESS_DBAWAITING COMMAND2680sleeping remote_user_namehost_ERP 0PRIMARY_PROCESS_DBAWAITING COMMAND2690sleeping remote_user_namehost_ERP 0PRIMARY_PROCESS_DBAWAITING COMMAND2700sleeping remote_user_namehost_ERP 0PRIMARY_PROCESS_DBAWAITING COMMAND2710sleeping remote_user_namehost_ERP 0PRIMARY_PROCESS_DBAWAITING COMMANDand these are locks from sp_lock 53 which is the current runningprocess:53700DB SGRANT53260TAB IXGRANT53210TAB IXGRANT53230TAB IXGRANT53220TAB IXGRANT532120TAB IXGRANT53290TAB IXGRANT532110TAB IXGRANT53232KEY(1902141b21c7) XGRANT53213KEY(e60041ad2c6f) XGRANT53232KEY(5b0233670fb9) XGRANT53232KEY(6e0212a7298c) XGRANT53232KEY(97013ece81c8) XGRANT53231KEY(e7006f987fb0) XGRANT53213KEY(ad00a33f46b9) XGRANT53210643560700TAB Sch-MGRANTany idee?ThanksMateusz
View 1 Replies View RelatedHi
I would like to convert sp_who into a table/query. Please help
Thanks
Hi
How to convert a sp_who in into a table/query
Please help
Raj.
Hi
we have one 'application'-user in sysusers that makes the connect to SqlServer for all users, for example:
Application Login-User: Thomas
DB-Connect-User: AppUser
With this solution, in Activity-Monitor or with sp_who I don't know, what is the real name of the connected user.
Any possibility to change the login-information after the connect, so that i can see 'Thomas' in Activity-Monitor or with sp_who?
Thanks for your help.
Thomas