<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: aprx.updateConnectionProperties() no hace nada. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612249#M74136</link>
    <description>&lt;P&gt;From your example, which is also in the help files, there is this line....&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If no matches are found when you replace the&amp;nbsp;current_connection_info&amp;nbsp;parameter with the&amp;nbsp;new_connection_info&amp;nbsp;parameter in the&amp;nbsp;updateConnectionProperties&amp;nbsp;function, your script may complete, but nothing will be updated.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm" target="_blank" rel="noopener"&gt;Updating and fixing data sources—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Perhaps you need to check with your data sources to see if they exist since it suggests that it won't update anything, and, there is no mention of it throwing an error message either.&lt;/P&gt;</description>
    <pubDate>Tue, 06 May 2025 22:31:08 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2025-05-06T22:31:08Z</dc:date>
    <item>
      <title>aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612068#M74131</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;El siguiente ejemplo que esta en la ayuda, no funciona para nada no pincha , no cambia nada.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx = arcpy.mp.ArcGISProject(&lt;/SPAN&gt;&lt;SPAN class=""&gt;r'C:\Projects\YosemiteNP\Yosemite.aprx'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx.updateConnectionProperties(&lt;/SPAN&gt;&lt;SPAN class=""&gt;None&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;r'C:\Projects\YosemiteNP\DBConnections\Server.sde'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx.saveACopy(&lt;/SPAN&gt;&lt;SPAN class=""&gt;r"C:\Projects\YosemiteNP\YosemiteNew.aprx"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;¿Alguna idea?, tengo un monton de APRX, que apuntan a la GEODATABASE de desarrollo, y debo cambiar la conexion para pasar a TESTING o PRODUCCION.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anibal Martinez&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 17:38:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612068#M74131</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-06T17:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612087#M74132</link>
      <description>&lt;P&gt;Intenta agregar ambas conexiones al SDE, la antigua y la nueva.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy

aprx = arcpy.mp.ArcGISProject(r"C:\Temp\Project.aprx")

old_conn = r"xyz\xyz\DEV.sde"
new_conn = r"xyz\xyz\PROD.sde"

# Conexiones al SDE, la antigua y la nueva
aprx.updateConnectionProperties(old_conn, new_conn)

aprx.saveACopy(r"C:\Temp\Project.aprx")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 18:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612087#M74132</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2025-05-06T18:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612101#M74134</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx = arcpy.mp.ArcGISProject(&lt;/SPAN&gt;&lt;SPAN class=""&gt;r'C:\Projects\YosemiteNP\Yosemite.aprx'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx.updateConnectionProperties(&lt;SPAN class=""&gt;r'C:\Projects\YosemiteNP\DBConnections\Server.sde'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;r'C:\Projects\YosemiteNP\DBConnections\NewServer.sde'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx.saveACopy(&lt;/SPAN&gt;&lt;SPAN class=""&gt;r"C:\Projects\YosemiteNP\YosemiteNew.aprx"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tony, Hice la prueba, y No hace nada.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 18:39:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612101#M74134</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-06T18:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612249#M74136</link>
      <description>&lt;P&gt;From your example, which is also in the help files, there is this line....&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If no matches are found when you replace the&amp;nbsp;current_connection_info&amp;nbsp;parameter with the&amp;nbsp;new_connection_info&amp;nbsp;parameter in the&amp;nbsp;updateConnectionProperties&amp;nbsp;function, your script may complete, but nothing will be updated.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm" target="_blank" rel="noopener"&gt;Updating and fixing data sources—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Perhaps you need to check with your data sources to see if they exist since it suggests that it won't update anything, and, there is no mention of it throwing an error message either.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 22:31:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612249#M74136</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-05-06T22:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612250#M74137</link>
      <description>&lt;P&gt;Gracias Dan, las conexiones también creadas por script pyhton y por las dudas utilizadas con ArcGIS Pro, para verificar. La versión actual de ArcGIS Pro es 3.1.6 y ArcGIS Server 11.1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Es muy frustrante, en 10.9.1 los sctipts funcionaban, luego de migrar y adaptarlos, nada.&lt;/P&gt;&lt;P&gt;He levantado un ticket al distribuidor local, ojala ellos encuentren algo.&lt;/P&gt;&lt;P&gt;Saludos,&lt;/P&gt;&lt;P&gt;Anibal&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 22:45:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612250#M74137</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-06T22:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612257#M74139</link>
      <description>&lt;P&gt;I tested the code I posted and it does work. Here is redefined code that will print out layers current connections to help.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy
import os

# Set your paths
project_path = "CURRENT"  # Or full path to your APRX file
old_gdb = r"C:\Temp\BuildingPermit.gdb"
new_gdb = r"C:\Temp\BPTest.gdb"

# Open the ArcGIS project
aprx = arcpy.mp.ArcGISProject(project_path)

# Iterate through each map in the project
for m in aprx.listMaps():
    for l in m.listLayers():
        if l.supports("CONNECTIONPROPERTIES"):
            try:
                # Get the current connection properties
                conProp = l.connectionProperties
                print(f"Layer: {l.name}, Current Database: {conProp['connection_info']['database']}")

                # Check if the layer is connected to the old geodatabase
                if conProp and 'connection_info' in conProp:
                    current_database = conProp['connection_info'].get('database', '')
                    if current_database.lower() == old_gdb.lower():
                        print(f"Updating connection for layer: {l.name}")
                        
                        # Update the database path to the new geodatabase
                        conProp['connection_info']['database'] = new_gdb
                        
                        # Apply the updated connection properties
                        l.updateConnectionProperties(l.connectionProperties, conProp)
                    else:
                        print(f"Layer {l.name} is not using the old GDB. Skipping...")
            except Exception as e:
                print(f"Error with layer {l.name}: {str(e)}")

# Save the updated project
aprx.saveACopy(r"C:\Temp\Project_Updated.aprx")
print("Update complete.")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 23:20:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612257#M74139</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2025-05-06T23:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612430#M74141</link>
      <description>&lt;P&gt;Hola Tony, mil gracias por el aporte, hice un pequeño cambio para que no pinche, y mas abajo la salida, ¿se te ocurre que puede estar pasando?&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;# Set your paths&lt;BR /&gt;project_path = r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTest.aprx" # Or full path to your APRX file&lt;BR /&gt;project_path_new=r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTestNew.aprx"&lt;BR /&gt;old_gdb = r"D:\Repo\VRed\main\project\Conexiones\SDE@MUGISD.sde"&lt;BR /&gt;new_gdb = r"D:\Repo\VRed\main\project\Conexiones\SDE@GISTECOD.sde"&lt;/P&gt;&lt;P&gt;# Open the ArcGIS project&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(project_path)&lt;BR /&gt;nroLys=0&lt;/P&gt;&lt;P&gt;# Iterate through each map in the project&lt;BR /&gt;for m in aprx.listMaps():&lt;BR /&gt;for l in m.listLayers():&lt;BR /&gt;nroLys=nroLys+1&lt;BR /&gt;print("layers nro=" + str(nroLys))&lt;BR /&gt;if l.supports("CONNECTIONPROPERTIES"):&lt;BR /&gt;try:&lt;BR /&gt;# Get the current connection properties&lt;BR /&gt;conProp = l.connectionProperties&lt;BR /&gt;print("conProp=" + str(conProp))&lt;BR /&gt;#comente la linea siguiente porque daba "Error with layer SDE.VIS_FC_EQ_HFC_LINEQ_V: 'database'"&lt;BR /&gt;#print(f"Layer: {l.name}, Current Database: {conProp['connection_info']['database']}")&lt;/P&gt;&lt;P&gt;# Check if the layer is connected to the old geodatabase&lt;BR /&gt;if conProp and 'connection_info' in conProp:&lt;BR /&gt;current_database = conProp['connection_info'].get('database', '')&lt;BR /&gt;if current_database.lower() == old_gdb.lower():&lt;BR /&gt;print(f"Updating connection for layer: {l.name}")&lt;BR /&gt;&lt;BR /&gt;# Update the database path to the new geodatabase&lt;BR /&gt;conProp['connection_info']['database'] = new_gdb&lt;BR /&gt;&lt;BR /&gt;# Apply the updated connection properties&lt;BR /&gt;l.updateConnectionProperties(l.connectionProperties, conProp)&lt;BR /&gt;else:&lt;BR /&gt;print(f"Layer {l.name} is not using the old GDB. Skipping...")&lt;BR /&gt;except Exception as e:&lt;BR /&gt;print(f"Error with layer {l.name}: {str(e)}")&lt;/P&gt;&lt;P&gt;# Save the updated project&lt;BR /&gt;aprx.saveACopy(project_path_new)&lt;BR /&gt;print("Update complete.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SALIDA:&lt;/P&gt;&lt;P&gt;C:\Users\u194934&amp;gt;"C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy.bat" D:\Repo\VRed\main\project\Scripts\Publicar\CS2.py&lt;BR /&gt;layers nro=1&lt;BR /&gt;conProp={'dataset': 'SDE.VIS_FC_EQ_HFC_LINEQ_V', 'workspace_factory': 'SDE', 'connection_info': {'authentication_mode': 'DBMS', 'dbclient': 'oracle', 'db_connection_properties': '192.168.244.71:1529/MUGISD', 'password': '&amp;lt;*********&amp;gt;', 'instance': 'sde:oracle$192.168.244.71:1529/MUGISD', 'server': '192.168.244.71', 'user': 'SDE', 'version': 'SDE.DEFAULT'}}&lt;BR /&gt;Layer SDE.VIS_FC_EQ_HFC_LINEQ_V is not using the old GDB. Skipping...&lt;BR /&gt;Update complete.&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 14:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612430#M74141</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-07T14:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612481#M74142</link>
      <description>&lt;P&gt;From what I can see, your code is checking if layers are connected to old_gdb (a .sde file path), but the actual connection is an Oracle database (not a file path). I don't have oracle&amp;nbsp; but give this a try,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy
import os

# Set your paths
project_path = "CURRENT"  # APRX file
old_gdb = r"C:\Temp\BuildingPermit.gdb"
new_gdb = r"C:\Temp\BPTest.gdb"

# Open the ArcGIS project
aprx = arcpy.mp.ArcGISProject(project_path)

# Iterate through each map in the project
for m in aprx.listMaps():
    for l in m.listLayers():
        if l.supports("CONNECTIONPROPERTIES"):
            try:
                # Get the current connection properties
                conProp = l.connectionProperties
                
                if conProp and 'connection_info' in conProp:
                    # Handle file geodatabase connections
                    if 'database' in conProp['connection_info']:
                        print(f"Layer: {l.name}, Current Database: {conProp['connection_info']['database']}")
                        if conProp['connection_info']['database'].lower() == old_gdb.lower():
                            print(f"Updating file GDB connection for layer: {l.name}")
                            conProp['connection_info']['database'] = new_gdb
                            l.updateConnectionProperties(l.connectionProperties, conProp)
                    
                    # Handle Oracle SDE connections
                    elif conProp['connection_info'].get('dbclient') == 'oracle':
                        instance = conProp['connection_info'].get('instance', '')
                        print(f"Layer: {l.name}, Oracle Instance: {instance}")
                        if "MUGISD" in instance.upper():
                            print(f"Updating Oracle connection for layer: {l.name}")
                            conProp['connection_info']['instance'] = instance.replace("MUGISD", "GISTECOD")
                            l.updateConnectionProperties(l.connectionProperties, conProp)
                    
                    else:
                        print(f"Layer {l.name} has unsupported connection type. Skipping...")
            
            except Exception as e:
                print(f"Error with layer {l.name}: {str(e)}")

# Save the updated project
aprx.saveACopy(r"C:\Temp\Project_Updated.aprx")
print("Update complete.")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 16:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612481#M74142</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2025-05-07T16:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612992#M74152</link>
      <description>&lt;P&gt;Intente, Tony, nada hace nada.&lt;/P&gt;&lt;P&gt;Primer ejemplo:&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;# Set your paths&lt;BR /&gt;project_path = r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTest.aprx" # Or full path to your APRX file&lt;BR /&gt;project_path_new=r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTestNew.aprx"&lt;BR /&gt;old_gdb = r"D:\Repo\VRed\main\project\Conexiones\SDE@MUGISD.sde"&lt;BR /&gt;new_gdb = r"D:\Repo\VRed\main\project\Conexiones\SDE@GISTECOD.sde"&lt;/P&gt;&lt;P&gt;# Open the ArcGIS project&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(project_path)&lt;BR /&gt;nroLys=0&lt;/P&gt;&lt;P&gt;# Iterate through each map in the project&lt;BR /&gt;for m in aprx.listMaps():&lt;BR /&gt;for l in m.listLayers():&lt;BR /&gt;nroLys=nroLys+1&lt;BR /&gt;print("layers nro=" + str(nroLys))&lt;BR /&gt;if l.supports("CONNECTIONPROPERTIES"):&lt;BR /&gt;try:&lt;BR /&gt;# Get the current connection properties&lt;BR /&gt;conProp = l.connectionProperties&lt;BR /&gt;# Check if the layer is connected Oracle SDE connections&lt;BR /&gt;if conProp['connection_info'].get('dbclient') == 'oracle':&lt;BR /&gt;instance = conProp['connection_info'].get('instance', '')&lt;BR /&gt;print(f"Layer: {l.name}, Oracle Instance: {instance}")&lt;BR /&gt;if "MUGISD" in instance.upper():&lt;BR /&gt;print(f"Updating Oracle connection for layer: {l.name}")&lt;BR /&gt;conProp['connection_info']['instance'] = instance.replace("MUGISD", "GISTECOD")&lt;BR /&gt;print("old=" + str(l.connectionProperties['connection_info']['instance']))&lt;BR /&gt;result=l.updateConnectionProperties(l.connectionProperties, conProp)&lt;BR /&gt;conProp = l.connectionProperties&lt;BR /&gt;print("new=" + str(l.connectionProperties['connection_info']['instance']))&lt;BR /&gt;print(result)&lt;BR /&gt;else:&lt;BR /&gt;print(f"Layer {l.name} has unsupported connection type. Skipping...")&lt;BR /&gt;except Exception as e:&lt;BR /&gt;print(f"Error with layer {l.name}: {str(e)}")&lt;BR /&gt;# Save the updated project&lt;BR /&gt;aprx.saveACopy(project_path_new)&lt;BR /&gt;print("Update complete.")&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SALIDA&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C:\Users\u194934&amp;gt;"C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy.bat" D:\Repo\VRed\main\project\Scripts\Publicar\CS2.py&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;layers nro=1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Layer: SDE.VIS_FC_EQ_HFC_LINEQ_V, Oracle Instance: sde:oracle$192.168.244.71:1529/MUGISD&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Updating Oracle connection for layer: SDE.VIS_FC_EQ_HFC_LINEQ_V&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;old=sde:oracle$192.168.244.71:1529/MUGISD&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;new=sde:oracle$192.168.244.71:1529/MUGISD&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;None&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Update complete.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luego, lo simplifique, y tampoco nada graba, nada escribe en el aprx, ni da error.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;# Set your paths&lt;BR /&gt;project_path = r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTest.aprx" # Or full path to your APRX file&lt;BR /&gt;project_path_new=r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTestNew.aprx"&lt;BR /&gt;old_conex = {'connection_info': {'authentication_mode': 'DBMS', 'dbclient': 'oracle', 'db_connection_properties': '192.168.244.71:1529/MUGISD', 'password': '&amp;lt;*********&amp;gt;', 'instance': 'sde:oracle$192.168.244.71:1529/MUGISD', 'server': '192.168.244.71', 'user': 'SDE', 'version': 'SDE.DEFAULT'}}&lt;BR /&gt;new_conex = {'connection_info': {'authentication_mode': 'DBMS', 'dbclient': 'oracle', 'db_connection_properties': '192.168.244.77:1528/GISTECOD', 'password': '&amp;lt;*********&amp;gt;', 'instance': 'sde:oracle$192.168.244.77:1528/GISTECOD', 'server': '192.168.244.77', 'user': 'SDE', 'version': 'SDE.DEFAULT'}}&lt;/P&gt;&lt;P&gt;# Open the ArcGIS project&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(project_path)&lt;BR /&gt;aprx.updateConnectionProperties(old_conex,new_conex)&lt;BR /&gt;nroLys=0&lt;/P&gt;&lt;P&gt;# Iterate through each map in the project&lt;BR /&gt;for m in aprx.listMaps():&lt;BR /&gt;for l in m.listLayers():&lt;BR /&gt;nroLys=nroLys+1&lt;BR /&gt;print("layers nro=" + str(nroLys))&lt;BR /&gt;if l.supports("CONNECTIONPROPERTIES"):&lt;BR /&gt;print("old=" + str(l.connectionProperties['connection_info']['instance']))&lt;BR /&gt;result=l.updateConnectionProperties(old_conex, new_conex)&lt;BR /&gt;print(f"Updating Oracle connection for layer: {l.name}")&lt;BR /&gt;print("new=" + str(l.connectionProperties['connection_info']['instance']))&lt;BR /&gt;print(result)&lt;BR /&gt;else:&lt;BR /&gt;print(f"Layer {l.name} has unsupported connection type. Skipping...")&lt;BR /&gt;&lt;BR /&gt;# Save the updated project&lt;BR /&gt;aprx.saveACopy(project_path_new)&lt;BR /&gt;print("Update complete.")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;SALIDA&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C:\Users\u194934&amp;gt;"C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy.bat" D:\Repo\VRed\main\project\Scripts\Publicar\CS3.py&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;layers nro=1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;old=sde:oracle$192.168.244.71:1529/MUGISD&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Updating Oracle connection for layer: SDE.VIS_FC_EQ_HFC_LINEQ_V&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;new=sde:oracle$192.168.244.71:1529/MUGISD&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;None&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Update complete.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Arcgis Pro 3.1.6 , Arcgis Server 11.1.0&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 21:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1612992#M74152</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-08T21:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1613261#M74160</link>
      <description>&lt;P&gt;Novedad!!!!&lt;/P&gt;&lt;P&gt;lyr.updateConnectionProperties(old, new)--&amp;gt; no hace nada, en todas las convinaciones que hicimos, pero ....&lt;/P&gt;&lt;P&gt;lyr.updateConnectionProperties(old, new,"",False)-- Graba!!!, modifica el lyr y luego de save, el aprx, voy a probar todo lo que hicimos con estos 2 parametros, que buscando que son:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;updateConnectionProperties (current_connection_info, new_connection_info, {auto_update_joins_and_relates}, {validate}, {ignore_case})&lt;/STRONG&gt;&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;auto_update_joins_and_relates&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;If set to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;True&lt;/SPAN&gt;, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;updateConnectionProperties&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method will also update the connections for associated joins or relates.&lt;/P&gt;&lt;P&gt;(The default value is True)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Boolean&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;validate&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;If set to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;True&lt;/SPAN&gt;, the connection properties will only be updated if the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;new_connection_info&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value is a valid connection. If it is not valid, the connection will not be replaced. If set to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;False&lt;/SPAN&gt;, the method will set all connections to match the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;new_connection_info&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value, regardless of a valid match. In this case, if a match does not exist, the data sources would be broken.&lt;/P&gt;&lt;P&gt;(The default value is True)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Boolean&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;ignore_case&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Determines whether searches will be case sensitive. By default, queries are case sensitive. To perform queries that are not case sensitive, set&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;ignore_case&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;True&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;(The default value is False)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Boolean&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;También es raro que me tome el 3er parámetro "", segun la documentación de arcgis Pro 3.4 única online, estamos trabajando con 3.1.6&lt;/P&gt;&lt;P&gt;Es un avance, el aprx igual no anda, tira un signo de exclamación a la BD,&amp;nbsp; pero fue modificado.&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 15:27:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1613261#M74160</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-09T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.updateConnectionProperties() no hace nada.</title>
      <link>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1613396#M74167</link>
      <description>&lt;P&gt;Funciona, hasta el primer ejemplo&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(r'D:\Repo\VRed\main\project\Scripts\Publicar\MiniTest.aprx')&lt;BR /&gt;result=aprx.updateConnectionProperties(r'D:\Repo\VRed\main\project\Conexiones\SDE@MUGISD.sde', r'D:\Repo\VRed\main\project\Conexiones\SDE@MUGIST.sde',&lt;FONT color="#FF00FF"&gt;&lt;EM&gt;&lt;STRONG&gt;False,False,True&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;)&lt;BR /&gt;print(result)&lt;BR /&gt;aprx.saveACopy(r"D:\Repo\VRed\main\project\Scripts\Publicar\MiniTestNew.aprx")&lt;/P&gt;&lt;P&gt;Cambia perfecto la conexion en el APRX, sin esos 3 parametros no funciona. No me puse a ver cual de los 3 es el responsable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gracias &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3265"&gt;@TonyAlmeida&lt;/a&gt;&amp;nbsp;, gracias &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;, por la ayuda, y espero les sirva a muchos, porque veo que hay mucha gente buscando solución a este tema.&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 19:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-updateconnectionproperties-no-hace-nada/m-p/1613396#M74167</guid>
      <dc:creator>AnibalMmartinez</dc:creator>
      <dc:date>2025-05-09T19:06:30Z</dc:date>
    </item>
  </channel>
</rss>

