Skip to main content

Hi all,

I am using FeatureWriter to update an existing Feature Class that lives in my SDE.

Versioning is enabled. The Transaction Type is a Versioned Edit Session and my Writer Mode is Insert. I have Drop Table as No and Truncate Table as Yes. Essentially I want to replace the old FC with the new one I am creating.

I noticed the writing was taking a while, and it seems like it eventually times out. Maybe this is the case, I want to double check with the community.

The full error message is:

"An error occurred while attempting to store a row into the table 'SDE.XXXX'. The error number from ArcObjects is: '-2147154945'. The error message from ArcObjects is: {Table schema changes after cursor declared [42000:[Microsoft][SQL Server Native Client 11.0][SQL Server]Could not complete cursor operation because the table schema changed after the cursor was declared.] [DB.SDE.XXXX]}"

To note: I am not touching anything while this process is running.

Thanks!

Hello @francism

 

Would you mind supplying the full log file and workspace.

 

This seems to be more of an underlying database issue from what I've been able to find. A few of the remedies seem to be either bug fixes or incorrect usage of SQL code. In your case, I don't imagine it is the latter.

 

If you are able to attach the log and workspaces that will help me troubleshoot the issue.

 


Hi @francism

FME is using dll's from ArcGIS as I know. Please make sure that your version of FME and ArcGIS are compatible. Also could you please try to use the SDE Writer to test if it works?


Hi @trentatsafe

 

You'll notice the runtime is 46 minutes, seems like a long time to write that many features (approx 15000) to an SDE.

 

 

featurewriter-tosde.fmw

 

featurewriter-tosdelog.txt

 

 


Hi @francism

FME is using dll's from ArcGIS as I know. Please make sure that your version of FME and ArcGIS are compatible. Also could you please try to use the SDE Writer to test if it works?

Hi @gisinnovationsb,

 

 

thanks for your response! I've been writing to FileGDB. I had not tried simply writing to SDE, it seems to be giving me the Error message.

 

 

Would this mean that my versions are not compatible?

 

 

I'm using FME Workbench 2017.0 with Esri License

 

ArcGIS 10.4

 


Hello @francism,

The performance hit you are seeing(the 46mins to write 15000 features) is likely as a result of writing to a versioned table. Versioned tables take a significant performance hit because each feature has to be verified before it is inserted. It should also be noted that Truncating is quite slow compared to a Drop table for example.

 

 

In terms of speeding the process up, you may be able to speed up the process by bypassing the ArcSDE writer and using SQL to update the back-end database. This is not recommended, as you are bypassing all the safeguards that ArcGIS generally takes care of.

If dropping the table is not possible, unregistering the table as versioned, writing your updates and then re-registering your table as versioned could speed up the process of updates.

 

 

The SQL method I described above, we will have an article outlining the process of how to do this shortly. It is currently being written.

 

 

A few other things I noticed on your workspace, you have 3 File Geodatabase readers, but you are only using one of them. You have 4 File Geodatabase writers, and you don't have any feature types for them.

Hello @francism,

The performance hit you are seeing(the 46mins to write 15000 features) is likely as a result of writing to a versioned table. Versioned tables take a significant performance hit because each feature has to be verified before it is inserted. It should also be noted that Truncating is quite slow compared to a Drop table for example.

 

 

In terms of speeding the process up, you may be able to speed up the process by bypassing the ArcSDE writer and using SQL to update the back-end database. This is not recommended, as you are bypassing all the safeguards that ArcGIS generally takes care of.

If dropping the table is not possible, unregistering the table as versioned, writing your updates and then re-registering your table as versioned could speed up the process of updates.

 

 

The SQL method I described above, we will have an article outlining the process of how to do this shortly. It is currently being written.

 

 

A few other things I noticed on your workspace, you have 3 File Geodatabase readers, but you are only using one of them. You have 4 File Geodatabase writers, and you don't have any feature types for them.
Thanks, this solution worked out.

 

 

I adjusted the from Truncating Table to Drop Table as well as ensuring that the Feature Class I'm writing to is Unregistered. I also adjusted my Transaction Type as a non-versioned Edit Session.

 

 

This worked for my problem and my Feature Writer is now working to the SDE.

 

 

Cheers!

Reply