programing

Oracle에서 Azure DB의 텍스트 필드로 clob 필드를 내보내는 중 오류 발생

magicmemo 2023. 8. 4. 23:00
반응형

Oracle에서 Azure DB의 텍스트 필드로 clob 필드를 내보내는 중 오류 발생

오라클 테이블에 PDF 파일을 저장하는 CLOB 필드가 있습니다.이 필드를 Azure의 SQL Server Db로 내보내려고 할 때 다음 오류가 발생했습니다.

2017/01/19 11:14:32 - ImpostoRenda 2.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Unexpected batch update error committing the database connection.
2017/01/19 11:14:32 - ImpostoRenda 2.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseBatchException: 
2017/01/19 11:14:32 - ImpostoRenda 2.0 - Error updating batch
2017/01/19 11:14:32 - ImpostoRenda 2.0 - I/O Error: Connection reset by peer: socket write error
2017/01/19 11:14:32 - ImpostoRenda 2.0 - 
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.core.database.Database.createKettleDatabaseBatchException(Database.java:1379)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.core.database.Database.emptyAndCommit(Database.java:1368)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.trans.steps.tableoutput.TableOutput.dispose(TableOutput.java:575)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.trans.step.RunThread.run(RunThread.java:96)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at java.lang.Thread.run(Unknown Source)
2017/01/19 11:14:32 - ImpostoRenda 2.0 - Caused by: java.sql.BatchUpdateException: I/O Error: Connection reset by peer: socket write error
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:969)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.core.database.Database.emptyAndCommit(Database.java:1355)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    ... 3 more
2017/01/19 11:14:32 - ImpostoRenda 2.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Unexpected error rolling back the database connection.
2017/01/19 11:14:32 - ImpostoRenda 2.0 - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2017/01/19 11:14:32 - ImpostoRenda 2.0 - Error performing rollback on connection
2017/01/19 11:14:32 - ImpostoRenda 2.0 - Invalid state, the Connection object is closed.
2017/01/19 11:14:32 - ImpostoRenda 2.0 - 
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.core.database.Database.rollback(Database.java:854)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.core.database.Database.rollback(Database.java:832)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.trans.steps.tableoutput.TableOutput.dispose(TableOutput.java:610)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.trans.step.RunThread.run(RunThread.java:96)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at java.lang.Thread.run(Unknown Source)
2017/01/19 11:14:32 - ImpostoRenda 2.0 - Caused by: java.sql.SQLException: Invalid state, the Connection object is closed.
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1699)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.rollback(ConnectionJDBC2.java:2100)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    at org.pentaho.di.core.database.Database.rollback(Database.java:845)
2017/01/19 11:14:32 - ImpostoRenda 2.0 -    ... 4 more

그러나 로컬 SQL Server DB에 동일한 변환을 실행하면 정상적으로 작동합니다.

어떻게 해결해야 합니까?

업데이트 1

TableOutput Step에서 "Commit Size"를 15보다 크게 설정하고 "삽입에 배치 업데이트 사용"을 true로 설정하면 문제가 발생한다는 것을 깨달았습니다.

클라이언트에서 TCP 매개 변수를 수정할 수 있습니다.

REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveTime /t REG_DWORD /d 30000
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveInterval /t REG_DWORD /d 1000
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v TcpMaxDataRetransmission /t REG_DWORD /d 10

언급URL : https://stackoverflow.com/questions/41742868/error-while-exporting-clob-field-from-oracle-to-text-field-on-azure-db

반응형