INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Sysprocesses

Sysprocesses table definition by TomKane
Posted: 16 Sep 03

sysprocesses (T-SQL)
The sysprocesses table holds information about processes running on Microsoft« SQL ServerÖ. These processes can be client processes or system processes. sysprocesses is stored only in the master database.

Column name    Data type    Description
spid            smallint    SQL Server process ID.
kpid            smallint    Microsoft Windows NT«  
                                thread ID.
blocked            smallint    Process ID (spid) of a  
                                blocking process.
waittype    binary(2)    Reserved.
waittime    int            Current wait time in
                                milliseconds. Is 0 when the
                                process is not waiting.
lastwaittype    nchar(32)    A string indicating the
                                name of the last or current
                                wait type.
waitresource    nchar(32)    Textual representation of a
                                lock resource.
dbid            smallint    ID of the database
                                currently being used by the
                                process.
uid            smallint    ID of the user who executed
                                the command.
cpu            int            Cumulative CPU time for the
                                process. The entry is
                                updated only for processes
                                performed on behalf of
                                Transact-SQL statements
                                executed when SET
                                STATISTICS TIME ON has been
                                activated in the same
                                session. The cpu column is
                                updated when a query has
                                been executed with SET
                                STATISTICS TIME ON. 0 is  
                                returned when SET
                                STATISTICS TIME is OFF.
physical_io    int            Cumulative disk reads and
                                writes for the process.
memusage    int            Number of pages in the
                                procedure cache that are
                                currently allocated to this
                                process. A negative number
                                indicates that the process
                                is freeing memory allocated
                                by another process.
login_time    datetime    Time at which a client
                                process logged into the
                                server. For system
                                processes, the time at
                                which SQL Server startup
                                occurred is stored.
last_batch    datetime    Last time a client process
                                executed a remote stored
                                procedure call or an
                                EXECUTE statement. For
                                system processes, the time
                                at which SQL Server startup
                                occurred is stored.
ecid            smallint    Execution context ID used
                                to uniquely identify the
                                subthreads operating on
                                behalf of a single process.
open_tran    smallint    Number of open transactions
                                for the process.
status            nchar(30)    Process ID status (for
                                example, running, sleeping,
                                and so on).
sid            binary(85)    Globally unique identifier
                                (GUID) for the user.
hostname    nchar(128)    Name of the workstation.
program_name    nchar(128)    Name of the application
                                program.
hostprocess    nchar(8)    Workstation process ID
                                number.
cmd            nchar(16)    Command currently being
                                executed.
nt_domain    nchar(128)    Windows NT domain for the
                                client (if using Windows NT
                                Authentication) or a
                                trusted connection.
nt_username    nchar(128)    Windows NT username for the
                                process (if using Windows
                                NT Authentication) or a
                                trusted connection.
net_address    nchar(12)    Assigned unique identifier
                                for the network interface
                                card on each userÆs
                                workstation. When the user
                                logs in, this identifier is
                                inserted in the net_address
                                column.
net_library    nchar(12)    Column in which the
                                clientÆs network library is
                                stored. Every client
                                process comes in on a
                                network connection. Network
                                connections have a network
                                library associated with
                                them that allows them to
                                make the connection.
loginame    nchar(128)    Login name.
suid            smallint    Server user ID of user who
                                executed command.

Back to Microsoft SQL Server: Programming FAQ Index
Back to Microsoft SQL Server: Programming Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close