[[email protected] log]# tail cron.log
2020-05-26/11:45:35 [ERR] 编辑任务#获取任务详情失败#任务ID-0
2020-05-26/11:46:59 [INF] 开始执行任务#bj-his-test-expdp.sh#命令-su - oracle -lc "/usr/local/shell/expdp.sh"
2020-05-26/11:56:16 [INF] 任务完成#bj-his-test-expdp.sh#命令-su - oracle -lc "/usr/local/shell/expdp.sh"
2020-05-26/11:56:16 [ERR] [[任务结束#更新任务日志失败- Error 1366: Incorrect string value: '\xD5\xEF\xB6\xCF" ...' for column 'result' at row 1]]
2020-05-26/12:31:25 [INF] 开始执行任务#bj-his-test-expdp.sh#命令-su - oracle -lc "/usr/local/shell/expdp.sh"
2020-05-26/12:34:07 [INF] 任务完成#bj-his-test-expdp.sh#命令-su - oracle -lc "/usr/local/shell/expdp.sh"
2020-05-26/12:34:07 [ERR] [[任务结束#更新任务日志失败- Error 1366: Incorrect string value: '\xD5\xEF\xB6\xCF" ...' for column 'result' at row 1]]
2020-05-26/12:50:26 [INF] 开始执行任务#bj-his-test-expdp.sh#命令-su - oracle -lc "/usr/local/shell/expdp.sh"
2020-05-26/12:52:51 [INF] 任务完成#bj-his-test-expdp.sh#命令-su - oracle -lc "/usr/local/shell/expdp.sh"
2020-05-26/12:52:51 [ERR] [[任务结束#更新任务日志失败- Error 1366: Incorrect string value: '\xD5\xEF\xB6\xCF" ...' for column 'result' at row 1]]
手工执行下面这个sql是可以成功的,为什么gocron自己执行报错:
UPDATE task_log
SET retry_times
= 0, status
= 2, result
= '主机: [bj-his-test-172.xxxxx:5921]\n\n\nExport: Release 11.2.0.4.0 - Production on Tue May 26 12:50:26 2020\n\nCopyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.\n\nConnected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production\nWith the Partitioning, OLAP, Data Mining and Real Application Testing options\nFLASHBACK automatically enabled to preserve database integrity.\nStarting "SYS"."SYS_EXPORT_SCHEMA_01": "/******** AS SYSDBA" directory=DATA_DIR Dumpfile=appuser_local_20200526_125026.dmp LOGFILE=appuser_local_20200526_125026.log schemas=appuser compression=all \nEstimate in progress using BLOCKS method...\nProcessing object type SCHEMA_EXPORT/TABLE/TABLE_DATA\nTotal estimation using BLOCKS method: 7.367 GB\nProcessing object type SCHEMA_EXPORT/USER\nProcessing object type SCHEMA_EXPORT/SYSTEM_GRANT\nProcessing object type SCHEMA_EXPORT/ROLE_GRANT\nProcessing object type SCHEMA_EXPORT/DEFAULT_ROLE\nProcessing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA\nProcessing object type SCHEMA_EXPORT/SYNONYM/SYNONYM\nProcessing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC\nProcessing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE\nProcessing object type SCHEMA_EXPORT/TABLE/TABLE\nProcessing object type SCHEMA_EXPORT/TABLE/COMMENT\nProcessing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC\nProcessing object type SCHEMA_EXPORT/FUNCTION/FUNCTION\nProcessing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE\nProcessing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC\nProcessing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION\nProcessing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE\nProcessing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX\nProcessing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX\nProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT\nProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS\nProcessing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS\nProcessing object type SCHEMA_EXPORT/VIEW/VIEW\nProcessing object type SCHEMA_EXPORT/VIEW/COMMENT\nProcessing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY\nProcessing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT\nProcessing object type SCHEMA_EXPORT/TABLE/TRIGGER\nProcessing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS\n. . exported "appuser"."EXTEND_MONITOR_ACCESS_RECORDS" 817.3 MB 359438 rows\n. . exported "appuser"."BAS_TASK_LOGS" 137.8 MB 5311296 rows\n. . exported "appuser"."INS_MEDLIST_YB1023" 29.30 MB 765537 rows\n. . exported "appuser"."PAY_TRANSACTION_DETAIL20191028" 7.634 MB 69943 rows\n. . exported "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded\n******************************************************************************\nDump file set for SYS.SYS_EXPORT_SCHEMA_01 is:\n /data/backup/appuser_local_20200526_125026.dmp\nJob "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Tue May 26 12:52:50 2020 elapsed 0 00:02:24\n\n\n\n', end_time
= '2020-05-26 12:52:51' WHERE id
=86