arcpy.CreateReplica_management

2751
2
04-04-2011 05:11 PM
AlvaroMoreno
New Contributor
Hi
I'm doing a script to automate the creation of replicas.
When I do it in the model builder working properly which is reasonable as it works on an open mxd and references to layers are easier to handle.

But when I try to run the same with python from the command line I get the following error:


  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 708, in CreateReplica
    raise e
arcgisscripting.ExecuteError: ERROR 000582: Error occurred during execution.
Failed to execute (CreateReplica).

file attached createReplica_v1.0.py with the code


The problem would be in the parameter "tratamiento" (is a layer) of "arcpy.CreateReplica_management"
Even the selection of the "location " have verified that all is well.

thanks
0 Kudos
2 Replies
RussellBrennan
Esri Contributor
I believe that the problem you are encountering is because of this line in your script:

DB__VERSION_DBO_DEFAULT___2_ = "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\DB.mdf"

In your script you are specifying the SQL Server data file for your geodatabase. This will not work in ArcGIS.

When specifying the output geodatabase you need to use the database server connection or the database connection to your geodatabase usually this will be something like this:

Database Server:
r'Database Servers\RUSSELL_SQLEXPRESS.gds\QADatabase (VERSION:DBO.DEFAULT)'


Database Connection:
r'Database Connections\production.sde'
0 Kudos
AlvaroMoreno
New Contributor
thanks for your answer,

change this line:

DB__VERSION_DBO_DEFAULT___2_ = "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\DB.mdf"


to

DB__VERSION_DBO_DEFAULT___2_ = "Database Servers\\PC11443_SQLEXPRESS.gds\\DB (VERSION:DBO.DEFAULT)"


and get the folowing error

ORA-24550: signal received: Unhandled exception: Code=c0000005 Flags=0

_kpedbg_dmp_stack()+231<-_kpeDbgCrash()+51<-_kpeDbgSignalHandler()+130<-_skgesig_Win_UnhandledExceptionFilter()+140<-76A50045<-773B21D5<-77379EA0<-00000000<-5B3
AEB97<-5B3ACF6B<-6AC00363<-695636D3<-6955AC10<-6E3E36F0<-6EE6A83E<-566E6633<-1E012C7B


thanks
0 Kudos