-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: java往数据库中直接存为clob字段时,oracle会报ORA-01704问题:字符串文字过长。 #1030
Comments
请贴出完整的运行日志 |
作者你好,已经以附件的形式上传了日志,其中字段“TRIGGER_COND” 是clob字段,长度超过四千的话,就会报这个错误。 |
…Clob Column #1030 ORA-1461 error occurs when executing merge statements with a NCLOB column as a target and a bind variable value which is longer than 4000 bytes: Only if String length > 4000 bytes. If instead of MERGE a separate statement is used for INSERT or UPDATE (based on situation) then the error is not reported.
已尝试解决这个问题,其实 你可以尝试下载 |
好的,等假期结束,我这边替换上去试下。此外Java 选择的随机发生器是指什么,没看懂。 |
我这边测试了一下,发现只有一条数据的情况下没有报错,但是多条还是会有问题,新的日志附在下面。 |
作者你好,就这个问题能否看下,是否好解决? |
我这两天再测试看看 |
下载此附件 解压后,放置在 我本地在 {
"job": {
"content": [
{
"writer": {
"name": "oraclewriter",
"parameter": {
"column": [
"DI_RULE_ID","TRIGGER_COND"
],
"username":"oracle",
"password":"xxxxxxx",
"connection": [
{
"jdbcUrl": "jdbc:oracle:thin:@oracle-server:1521/ini"
,
"table": [
"stg01.addax_test"
]
}
],
"writeMode": "update (DI_RULE_ID)"
}
},
"reader": {
"name": "datareader",
"parameter": {
"column": [
{
"value": "100,120",
"rule":"incr",
"type": "long"
},
{
"value": "100,5000",
"rule":"random",
"type": "string"
}
],
"sliceRecordCount": 10
}
}
}
],
"setting": {
"speed": {
"bytes": -1,
"channel": 1
}
}
}
} |
What happened?
作者你好,就是我在使用addax同步oralce中的数据时,当遇到表中有clob字段并且使用update模式时,clob数据过大就会报连接重置,我觉得可不可以按照以下链接的方式处理一下clob字段,大约每三千个字符长度进行一次截断,然后用to_clob('字符1') || to_clob('字符2') || to_clob('字符3') || to_clob('字符4')拼接回来?附上链接。
https://juejin.cn/post/7019677362035884063
Version
4.1.4
OS Type
centos
Java JDK Version
Oracle JDK 1.8.0
Relevant log output
No response
The text was updated successfully, but these errors were encountered: