[GIS] Meaning of number after username in file geodatabase schema lock

arcobjectsfile-geodatabase

I'm using the ISchemaLock interface to return schemalock info on featureclasses in a file geodatabase:

// If schemalock count is >=2, then we have a problem, something else has a lock on the FC
                if (slc >= 2)
                {
                    c.msg = "Schemalock count on FC '" + fc + "' in FGDB '" + kvp.Key[0] + "': " + slc.ToString();
                    Console.WriteLine(c.msg);
                    Messaging.Log(c.msg, c.lw);
                    ISchemaLock sl2 = (ISchemaLock)ds;
                    IEnumSchemaLockInfo enumSLI2;
                    sl2.GetCurrentSchemaLocks(out enumSLI2);
                    ISchemaLockInfo sli2 = enumSLI2.Next();
                    while (sli2 != null)
                    {
                        c.msg = "  Schemalock info: " + sli2.TableName + " : " + sli2.UserName + " : " + sli2.SchemaLockType;
                        Console.WriteLine(c.msg);
                        Messaging.Log(c.msg, c.lw);
                        sli2 = enumSLI2.Next();
                    }
                    keysToDelete.Add(kvp.Key);
                    break;
                }

sli2.UserName returns something along the lines of:

HOU-AGSPRD01.10768

HOU-AGSPRD01 is my server name obviously, but can anyone tell me what the "10768" is? I'm thinking it's the PID of the process that has the lock on the particular featureclass. Any ideas?

EDIT: Kirk and Matt are both correct (can I not set 2 answers to correct?):

alt text

Best Answer

I think they are just pointers to lock files. The lock file name has the suffix shown for the username and the PID. So if you want the PID you'd need to find the lock file having the username's suffix, then parse out the PID from the the lock file.

For example, when I open arcmap with a featureclass in it, then run a standalone exe that opens the same featureclass, I see these files:

D:\forumtest.gdb\ED50Points.S3430F.2924.7980.sr.lock
D:\forumtest.gdb\_gdb.S3430F.6740.6628.sr.lock

The list of usernames looks like this:

username: S3430F.2924
username: S3430F.6740

In task manager, I see no process whose PID = 6740 or 2924, but there's one for both 7980 and 6628.