Select to view content in your preferred language

Script database connect

723
3
03-20-2012 04:09 AM
RenatoNogueira
New Contributor
Hi..
Is new programin in language python and problem connection database script arcsde.

Create script in arc catalog and export script to execute.

Script:

# ---------------------------------------------------------------------------
# processo_01.py
# Created on: 2012-01-13 11:30:03.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

arcpy.env.workspace = "C:\\\connectionFiles\\GEO_DADOS.sde"

# Local variables:
gisvcc_dbo_INT_VW_SIG_IMOVEIS = "gisvcc.dbo.INT_VW_SIG_IMOVEIS"
gisvcc_GEO_DADOS_SIG_IMOVEIS = "gisvcc.GEO_DADOS.SIG_IMOVEIS"

# Process: Copy
arcpy.Copy_management(gisvcc_dbo_INT_VW_SIG_IMOVEIS, gisvcc_GEO_DADOS_SIG_IMOVEIS, "Table")

Before run script error:

C:\Python26\ArcGIS10.0>python.exe C:\Users\xxxx\Desktop\processo_01.
py
Traceback (most recent call last):
  File "C:\Users\xxxx\Desktop\processo_01.py", line 18, in <module>
    arcpy.Copy_management(gisvcc_dbo_INT_VW_SIG_IMOVEIS, gisvcc_GEO_DADOS_SIG_IM
OVEIS, "Table")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", li
ne 3010, in Copy
    raise e
arcgisscripting.ExecuteError: ERROR 000258: Output C:\\connectionFiles\GEO_DADOS
.sde\gisvcc.GEO_DADOS.SIG_IMOVEIS already exists
Failed to execute (Copy).

which this error can be?!!?!?!?!?
Tags (2)
0 Kudos
3 Replies
MikeMacRae
Frequent Contributor
It looks like your output in arcpy.Copy_management already exists. I would either delete it or use an overwrite statement to overwrite your output.
0 Kudos
RenatoNogueira
New Contributor
It looks like your output in arcpy.Copy_management already exists. I would either delete it or use an overwrite statement to overwrite your output.


Inside the tool it deletes and then recreates the information. Can you tell me which statement you use to delete first and then reconstruct the data?
0 Kudos
MichaelVolz
Esteemed Contributor
renatognog:

Is your data being consumed by an ArcGIS Server service or ArcIMS service?  If it is I would recommend a truncate and append process that bypasses schema locks that are in place from the above mentioned services.  DeleteRows_Management followed by Append_Management
0 Kudos