I have a snippet that creates a database connection to an enterprise geodatabase, then list the tables:
import arcpy
new_conn2 = arcpy.management.CreateDatabaseConnection(r"c:\temp", "Myconnection2", "SQL_SERVER", "MySQLServer", account_authentication="DATABASE_AUTH",
username="myUser",
password="mySecretPassword",
save_user_pass="SAVE_USERNAME", database="myEGDB")
print(arcpy.Describe(new_conn2[0]).dataElementType)
arcpy.env.workspace = new_conn2[0]
# Get and print a list of tables
tables = arcpy.ListTables()
for table in tables:
print(table)
the output when I run the snippet in ArcGIS Pro 3.0 is:
'DEWorkspace'
DATAOWNER.P_Centerline_Sequence
DATAOWNER.P_DocumentPoint__ATTACH
DATAOWNER.P_CasingInspection
DATAOWNER.P_CPBondInspection
DATAOWNER.P_CPRectifierInspection
DATAOWNER.P_CPTestPointReading
DATAOWNER.P_CrossingInspection
DATAOWNER.P_ElectricSurvey
DATAOWNER.P_ExcavationDamage__ATTACH
DATAOWNER.P_ExposedPipeInspect__ATTACH
DATAOWNER.P_GasLeak__ATTACH
DATAOWNER.P_GasLeakInspect
.....
When I run the same code in ArcGIS Server python instance the output is:
'DEFile'
I tried using the Python3 command prompt as well as the Jupyter notebook present in the ArcGIS Server installation.
@BrianClee or @GhislainPrince do you have any idea about this?