For your examples you could craft a routine to tell you this informationanything ending in a gdb will be file geodatabasedo a describe on a sde connection and look at the instance will tell you that database it is based on the connection string e.g.
desc = arcpy.Describe(Database Connections\Localhost SQL.sde) cp = desc.connectionProperties print cp.instance > sde:sqlserver:svr-gis-01
The only issue I see are the old style SDE connection where the instance will be a port number.
Connectez-vous pour publier, suivre le contenu, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.