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?):