AnsweredAssumed Answered

Problem with arcpy.CreateDatabaseConnection_management

Question asked by on Mar 9, 2017
Latest reply on Mar 9, 2017 by
 print "Creating SDE database connection properties file"
                arcpy.CreateDatabaseConnection_management(out_folder_path=os.getcwd(), out_name=Connection_File_Name, database_platform=database_type, instance=instance, database="", account_authentication="DATABASE_AUTH", username=dbms_admin, password=dbms_admin_pwd, save_user_pass="TRUE")
                if arcpy.Exists("Database Connections\\" + Connection_File_Name):
                        print "Current SDE connection was created and database connection successful"
                        # Don't hard exit on failure.  If creating a "system" sde file arcpy exist does not work correctly.
                        print "Unable to validate connection to SDE database. There could be a problem with the sde file"

We are currently working a project to upgrade from Oracle 11g to 12c, and ESRI 10.0 to 10.4.  In the previous environment our developers had a python script used as part of our install process that created and validated and SDE connection to the Oracle database.  The python script has been tweaked for ESRI 10.4 / Oracle 12c.  We are unable to get a connection using the script, but can connect from the server running ESRI 10.4 to the Oracle 12c database from both SQLPLUS and through ArcMAP.  Above is the section of the script that is failing (we constantly get the "Unable to validate connection to SDE database).



Any thoughts on what may be wrong would be greatly appreciated.  We are using the 32-bit Oracle client for the connection, but can't get it to work from the python script.  Thanks for any help !!!