Possible work-around (forum posting http://forums.esri.com/Thread.asp?c=93&f=1729&t=251511):# Test Schema Lock on output layer# @9.1 - full path to featureclass was valid# @9.2 - use out featureclass name after declaring gp.workspace# Full path to featureclass won't work (always returns ERROR)outfc = "Database Connections\\conservation.sde\\CONSERVATION.StateHeritageSites"#Get workspace of output featureclassoutws = os.path.dirname(outfc)gp.workspace = outws ###required#Get name of output featureclassoutfcname = os.path.basename(outfc) lockTest = gp.TestSchemaLock(outfcname)