<?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: suppress data source password dialog in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213147#M16419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you mean like ListRasters &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listrasters.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listrasters.htm"&gt;ListRasters—Help | ArcGIS for Desktop&lt;/A&gt; no mapping, pure arcpy, throw it a path and away you go&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 May 2016 21:35:58 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-05-14T21:35:58Z</dc:date>
    <item>
      <title>suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213137#M16409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to re-point all sde raster layers in mxds to a new sde instance (we are moving from sde 9.3.1 to 10.1). Many people have also have ODBC connections within their mxds for tabular data from non-spatial databases. The problem is when I run the script it is constantly prompting me for credentials. I could care less about them for this exercise as I do not need to update the ODBC connection. I would like to just suppress them. Can this be done?&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/200169_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import os
import time


path_layer = r"***"
osa_sde_path = r"***"
sde_user = "***"
log = open("log.txt", "w")


for dir_path, dir_names, file_names in os.walk(path_layer):
&amp;nbsp;&amp;nbsp;&amp;nbsp; for file_name in file_names:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if file_name[-3:] == "mxd":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ts = os.path.getmtime(os.path.join(dir_path, file_name))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mod_date = time.strftime('%m/%Y', time.gmtime(ts))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mod_date_list = mod_date.split("/")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if int(mod_date_list[1]) &amp;gt; 2012 and int(mod_date_list[0]) &amp;gt; 4:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(os.path.join(dir_path, file_name))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layers_list = arcpy.mapping.ListLayers(mxd)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Updating:\t" + os.path.join(dir_path, file_name)


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for layer in layers_list:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer.supports("DATASOURCE"):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_source = layer.dataSource
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if data_source.find(sde_user) != -1 and layer.isRasterLayer:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "\tUpdating:\t" + layer.name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dot_index = data_source.rfind(".")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset_name = data_source[dot_index + 1:]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "\t\tNew Path:\t" + os.path.join(osa_sde_path, sde_user + "." + 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset_name)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.replaceDataSource(osa_sde_path, "SDE_WORKSPACE", sde_user + "." + 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataset_name, False)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer.isBroken:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log.write(os.path.join(dir_path, file_name))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Data Source Broken"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.save()
log.close()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:28:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213137#M16409</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2021-12-11T10:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213138#M16410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;certainly not anything in arcpy or arcpy.mapping or Pro's arcpy.ma module&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm"&gt;Introduction to arcpy.mp—ArcPy | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;assuming it is line 33 that is raising the login &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 23:54:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213138#M16410</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-05-13T23:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213139#M16411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Line 20 is the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 00:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213139#M16411</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-05-14T00:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213140#M16412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got waylaid in Pro's help and the only place I saw with the ability to pass a password was here&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/updatingandfixingdatasources.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/updatingandfixingdatasources.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Updating and fixing data sources—ArcPy | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 0.875rem; margin-bottom: 1.71429em; color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif;"&gt;A database connection data source with no joins or relates:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;{'connection_info': {'authentication_mode': 'DBMS', 'database': 'gis', 
'db_connection_properties': 'Esri', 'dbclient': 'sqlserver',
 'instance': 'sde:sqlserver:Esri', 'password': '*********', 
'server': 'gis', 'user': 'arcpy', 'version': 'sde.DEFAULT'},
 'dataset': 'gis.arcpy.RangerStations', 'workspace_factory': 'SDE'}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/updatingandfixingdatasources.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/updatingandfixingdatasources.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Updating and fixing data sources with arcpy.mapping—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kn" style="color: blue; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="nn" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;r"C:\Project\Project_default.mxd"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;findAndReplaceWorkspacePaths&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;r"C:\Project\Connection with password info saved.sde"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;r"C:\Project\Connection with no password info saved.sde"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="bp" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;False&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;saveACopy&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;r"C:\Project\Project_NP.mxd"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="k" style="color: blue; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;del&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt;mxd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So Forest, you are on your own... another reason I prefer working with local data&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/silly.png" /&gt; hope you find something&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:28:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213140#M16412</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T10:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213141#M16413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you open 1 of the mxds yourself, would you be presented with having to enter credentials for the data connection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you would need to first get an inventory of all the connections on the mxds that you will be resourcing where you save this information to a text file or a spreadsheet.&amp;nbsp; Then if possible you could get the actual credentials for all the connections that you need to make.&amp;nbsp; Then you could have a python subroutine called where you would associate each user with the appropriate password and then make the connection.&amp;nbsp; Then you can use this same information to make new user connections in the new database and then save the mxds and your mxds will now be resourced and you have bypassed the script stopping where it asks for credentials.&amp;nbsp; The big question here is if you would have permission to access all the user's passwords and place them in your script .&amp;nbsp; You will also want to keep this script in a secure location as it would be listing all of the user's passwords.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 15:32:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213141#M16413</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2016-05-14T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213142#M16414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could use a connection file?&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/create-arcsde-connection-file.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/create-arcsde-connection-file.htm"&gt;Create ArcSDE Connection File—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 16:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213142#M16414</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-05-14T16:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213143#M16415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Dan Patterson wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Forest, you are on your own... another reason I prefer working with local data&lt;SPAN class="emoticon_silly emoticon-inline" style="height: 16px; width: 16px;"&gt;&lt;/SPAN&gt; hope you find something&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Ya, local is nice. But just not possible in our situation. We would have 200 copies of a feature class littered across the network--none of them the same or up to date. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 18:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213143#M16415</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-05-14T18:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213144#M16416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Michael Volz wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you open 1 of the mxds yourself, would you be presented with having to enter credentials for the data connection?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, I would.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Michael Volz wrote:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;Maybe you would need to first get an inventory of all the connections on the mxds that you will be resourcing where you save this information to a text file or a spreadsheet. Then if possible you could get the actual credentials for all the connections that you need to make. Then you could have a python subroutine called where you would associate each user with the appropriate password and then make the connection. Then you can use this same information to make new user connections in the new database and then save the mxds and your mxds will now be resourced and you have bypassed the script stopping where it asks for credentials. The big question here is if you would have permission to access all the user's passwords and place them in your script . You will also want to keep this script in a secure location as it would be listing all of the user's passwords.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I do not need to update the (non-sde) connections that are causing the Enter Password dialog. They are fine. I just need to update all raster layers in the mxds that point to one sde schema, sde_user, in the code. This part is working, if I just hit cancel on the dialog the code completes and successfully updates the target connections. The problem is that one just has to sit there and hit cancel over and over. Something like 40 times for my test set of mxds. The other option would be to some how pass my &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;credentials to the dialog.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 18:53:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213144#M16416</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-05-14T18:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213145#M16417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a non-sde connection that is causing the problem.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 18:58:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213145#M16417</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-05-14T18:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213146#M16418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any one know how to get a list of only raster layers in a mxd without using arcpy.mapping.ListLayers(mxd) as it looks like it the dialog is occurring when this object asks for info for the non-sde layers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 19:00:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213146#M16418</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-05-14T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: suppress data source password dialog</title>
      <link>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213147#M16419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you mean like ListRasters &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listrasters.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/listrasters.htm"&gt;ListRasters—Help | ArcGIS for Desktop&lt;/A&gt; no mapping, pure arcpy, throw it a path and away you go&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 21:35:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/suppress-data-source-password-dialog/m-p/213147#M16419</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-05-14T21:35:58Z</dc:date>
    </item>
  </channel>
</rss>

