Error loading CSV into Oracle using Copy Data Activity

Tim Burke 20 Reputation points
2024-12-03T14:47:50.6966667+00:00

Trying to load a CSV file into Oracle. I am able to import the schema and map the source to the target. When I go to run the pipeline, I get the following error:

UserErrorOdbcOperationFailed

Failure happened on 'Sink' side. ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]General error. setStmtType failed

ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]Error in SQL Parser.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]General error. setStmtType failed

ERROR [HY000] [Microsoft][ODBC Oracle Wire Protocol driver]Error in SQL Parser.,Source=msora28.dll,'

Anyone else see this error and how did you resolve it? Thanks!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,295 questions
{count} votes

Accepted answer
  1. phemanth 14,220 Reputation points Microsoft External Staff
    2024-12-06T06:15:29.7033333+00:00

    @Tim Burke I'm glad to hear that you were able to resolve the issue by removing the truncate table call and using the "DELETE" statement instead.

    Regarding the new error you are encountering with the "pre-copy script" attribute, it seems to be related to a syntax error in the SQL command. Specifically, the error message "ORA-00933: SQL command not properly ended" indicates that there is a problem with the syntax of the SQL command.

    To resolve this issue, you may want to double-check the syntax of the SQL command and make sure that it is properly formatted. You can also try running the SQL command directly in Oracle SQL Developer to see if it produces any errors or warnings.

    If the issue persists, you can try adjusting the WorkArounds2 property as I mentioned earlier. The value for WorkArounds2 that you can try is 2.

    Hope this helps. Please do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tim Burke 20 Reputation points
    2024-12-03T20:40:01.6966667+00:00

    Hi @phemanth

    I'm still getting the same error after adding the WorkArounds Value: 536870912.

    Now, I'm trying to load a CSV file with all string values into an Oracle Table that has all VARCHAR2 columns. Not sure if this matters.

    Thanks for your help!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.