How do I set the SDE version in SSIS dataflow sour

2019-09-12 00:35发布

问题:

I have a GIS oracle database and I am needing to reference in a SSIS dataflow task. Ideally I would normally do something like this (which works perfectly in Oracle SQL Developer):

execute sde.version_util.set_current_version('SAFE.mvedits')
SELECT CAD_EVENTID
FROM SAFE.INCIDENT_POINT_MV

however when I try to use that as the SQL command of my OLE DB Datasource it throws me an "Invalid SQL" error.

How do I set the SDE version in a SSIS dataflow task data source?

回答1:

Knowing nothing of nothing on Oracle, what you might try is

  1. In your Oracle Connection Manager, change the property RetainSameConnection to True. This means that all connections will Oracle will use the same thread.

  2. Add an Execute SQL Task before your Data Flow that talks to Oracle. Use your query there to modify the current version thing. This setting should be persisted on the connection.

  3. In your OLE DB Datasource, start with the SELECT statement.

You might need to set DelayValidation to true as well.

If that's not working, let me know and I'll see if I can come up with anything else.



回答2:

As it turns out this is a shortfall of interacting with GIS Oracle databases through thirdparty applications. In my situation we addressed it by just bundling the change up in a stored procedure that lives on the oracle server and invoking that stored procedure from inside SSIS.



标签: oracle ssis gis