SID and PID

  • Hi can any one explain what these SID and PID . what is the use of them..

  • In what context? As seen where?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Asked in the interview Gail.

  • m.rajesh.uk (6/4/2013)


    Hi can any one explain what these SID and PID . what is the use of them..

    Are these column names from some system tables?


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • All I can think of is the process identifier used in task manager and the security identifiers as used in syslogins which uniquely identifies and entity.

  • m.rajesh.uk (6/4/2013)


    Asked in the interview Gail.

    Then not enough context to answer. I would have asked the interviewer to clarify his question. They're probably identifiers, but what they're identifying depends on what context is being asked.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for every one for your valuable time in answering the issues i am getting.

  • btw, if I was asked the meaning of some obscure column in a system table in an interview, my answer would be 'if I need to know that, I'll look it up in Books Online, where all the system tables are well documented"

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • They're typically Oracle terms. SID would most closely relate to SPID in SQL Server and PID to the OS level process ID.

    There's no direct correlation to SQL Server, as in Oracle, with default settings (dedicated server process), each user connection would have a OS-level process to itself, therefore you'd have one PID for each SID. In Shared mode, you'd have multiple SIDs to PIDs, but still likely to be more than one PID. Then, other functions of the Oracle Database are handled by other processes that communicate with each other, each of which have their own PIDs.

    In SQL Server, there's only one OS-level process (sqlservr.exe), which handles all operations of the SQL Server engine.

  • HowardW (6/4/2013)


    They're typically Oracle terms. SID would most closely relate to SPID in SQL Server and PID to the OS level process ID.

    There's no direct correlation to SQL Server, as in Oracle, with default settings (dedicated server process), each user connection would have a OS-level process to itself, therefore you'd have one PID for each SID. In Shared mode, you'd have multiple SIDs to PIDs, but still likely to be more than one PID. Then, other functions of the Oracle Database are handled by other processes that communicate with each other, each of which have their own PIDs.

    In SQL Server, there's only one OS-level process (sqlservr.exe), which handles all operations of the SQL Server engine.

    Actually, SID is the security id in SQL Server. PID is more likely synonymous with SPID in SQL Server.

    From the definition of SID in sys.server_principals:

    SID (Security-IDentifier) of the principal. If Windows principal, then it matches Windows SID.

  • Lynn Pettis (6/4/2013)


    Actually, SID is the security id in SQL Server. PID is more likely synonymous with SPID in SQL Server.

    From the definition of SID in sys.server_principals:

    SID (Security-IDentifier) of the principal. If Windows principal, then it matches Windows SID.

    Sure, SID is an acronym used in SQL Server, but the two together in an interview are likely to be referring to Oracle (although I can only guess).

    In Oracle terms, the SID is roughly equivalent to SPID, as it's the internal identifier for a session, whereas PID is the actual OS level process ID from Linux/Windows.

  • I wouldn't assume Oracle unless I actually saw something that looked Oracle, like CREATE OR REPLACE. This was posted on a SQL Server forum with not (or actually any) real details. At this point I would think SQL Server still.

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply