首页 > 其他分享 >【YashanDB知识库】审计表UNIFIED_AUDIT_TRAIL出现YAS-00220 utf8 sequence is wrong

【YashanDB知识库】审计表UNIFIED_AUDIT_TRAIL出现YAS-00220 utf8 sequence is wrong

时间:2025-01-10 10:48:16浏览次数:1  
标签:AUDIT UNIFIED YashanDB area sequence SALES -------------------------------------

【问题分类】功能使用

【关键字】UNIFIED_AUDIT_TRAIL,YAS-00220

【问题描述】当审计对象的SQL语句包含非标准中文字符时,出现YAS-00220 utf8 sequence is wrong,影响审计记录。

--第一步:打开审计开关

SQL> ALTER SYSTEM SET UNIFIED_AUDITING = true;

 

Succeed.

 

--创建审计策略

CREATE AUDIT POLICY up2

  ACTIONS DROP TABLE,DELETE ON sales.area,INSERT ON sales.area,UPDATE ON sales.area,ALL ON sales.sales_info;

 

AUDIT POLICY up2;

 

--第二步:执行操作被正常记录

SQL> conn sales/sales

 

Connected to:

YashanDB Server Enterprise Edition Release 23.2.7.100 x86_64 - Linux

 

SQL> UPDATE area SET DHQ='guangzhou' WHERE area_no='01';

 

1 row affected.

 

SQL> commit;

 

Succeed.

 

SQL> SELECT dbusername,event_timestamp,sql_text,object_schema

FROM UNIFIED_AUDIT_TRAIL

WHERE dbusername='SALES'; 2 3

 

DBUSERNAME EVENT_TIMESTAMP SQL_TEXT OBJECT_SCHEMA

---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ----------------------------------------------------------------

SALES 2024-12-11 09:52:27.602837 UPDATE area SET DHQ='guangzhou' WHERE area_no='01' SALES

 

1 row fetched.

 

--第三步:其中 '广.' 为非正常中文字段,查看审计表出现报错

SQL> UPDATE area SET DHQ='广.' WHERE area_no='01';

 

1 row affected.

 

SQL> commit;

 

Succeed.

 

SQL> SELECT dbusername,event_timestamp,sql_text,object_schema

FROM UNIFIED_AUDIT_TRAIL

WHERE dbusername='SALES'; 2 3

 

DBUSERNAME EVENT_TIMESTAMP SQL_TEXT OBJECT_SCHEMA

---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ----------------------------------------------------------------

SALES 2024-12-11 09:52:27.602837 UPDATE area SET DHQ='guangzhou' WHERE area_no='01' SALES

 

YAS-00220 utf8 sequence is wrong

 

--第四步:执行操作无法被正常记录

SQL> UPDATE area SET DHQ='guangzhou' WHERE area_no='01';

 

1 row affected.

 

SQL> commit;

 

Succeed.

 

SQL> SELECT dbusername,event_timestamp,sql_text,object_schema FROM UNIFIED_AUDIT_TRAIL WHERE dbusername='SALES';

 

DBUSERNAME EVENT_TIMESTAMP SQL_TEXT OBJECT_SCHEMA

---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ----------------------------------------------------------------

SALES 2024-12-11 09:52:27.602837 UPDATE area SET DHQ='guangzhou' WHERE area_no='01' SALES

 

YAS-00220 utf8 sequence is wrong

【问题原因分析】数据库BUG

【解决/规避方法】避免包含非正常中文字符,重新清理审计表。

BEGIN

  DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL (

        DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED,

        true);

END;

/

【影响范围】23.2.9.xxx前的所有版本

【修复版本】-

标签:AUDIT,UNIFIED,YashanDB,area,sequence,SALES,-------------------------------------
From: https://www.cnblogs.com/YashanDB/p/18663518

相关文章

  • 【YashanDB知识库】kettle做增量同步,出现报错:Unrecognized VM option 'MaxPermSize-25
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7863039.html?templateId=1718516问题现象kettle在增量同步过程,出现报错:UnrecognizedVMoption'MaxPermSize=256m'问题的风险及影响无法使用kettle做增量同步,导致迁移进度会有所影响问题影响的版......
  • 【YashanDB知识库】进行load data的时候报找不到动态库liblz4.so
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7863047.html?templateId=1718516现象23.2版本的依赖项准备里指明,要依赖动态库:liblz4.so,liblz4.so.1,liblz4.so.1.9.3在执行loaddata的时候报找不到动态库liblz4.so操作系统在/lib64/目录下有liblz4.......
  • 【YashanDB知识库】解决mybatis的mapper文件sql语句结尾加分号";"报错
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7863046.html?templateId=1718516现象mybatis或mybaits-plus的mapper文件sql结尾加分号";"执行时报错:”YAS-04209unexpectedword;“解决办法将sql结尾分号“;”去掉。使用注解方式写的sql语句也......
  • [ARC138E] Decreasing Subsequence
    [ARC138E]DecreasingSubsequence题意给出\(3\leqn\leq5000,2\leqk\leq(n+1)/2\),对所有长度为\(n\)的满足\(0\leqa_i\leqi\)且正数项两两不同的序列\(a\),求长度为\(k\)的元素非\(0\)的下降子序列个数之和。思路先刻画序列。对所有\(a_i\)减去\(1\),新......
  • [CF2053E] Resourceful Caterpillar Sequence 题解
    显然两步之内决胜负。否则两个人会来回拉扯,平局。考虑何时Aron会赢。称与叶子结点边距离小于等于\(1\)的结点为【制胜点】。开局\(q\)在叶子,\(p\)不在叶子,直接赢。方案数\(c(n-c)\),其中\(c\)为叶子数量。\(q\)在一个连着【制胜点】的点,\(p\)不在【制胜点】。Nora......
  • 【YashanDB知识库】YAS-02547 there is a gap in the restored archived logs on inst
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7849017.html?templateId=1718516【标题】错误码处理【问题分类】执行数据库归档注册时报错【关键字】YAS-02547【问题描述】执行restorearchivelogsequencebetweenxxxandyyythread1fromse......
  • 【YashanDB知识库】YAS-02605 the current instance is not master role
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7849018.html?templateId=1718516【标题】错误码处理【问题分类】恢复YAC数据库报错【关键字】YAS-02605【问题描述】在共享集群架构数据库上实施恢复,触发报错【问题原因分析】执行恢复的节点不是ma......
  • 【YashanDB知识库】YAS-02507 base incremental backup set does not exist
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7849016.html?templateId=1718516【标题】错误码处理【问题分类】执行数据库备份命令时报错【关键字】YAS-02507【问题描述】执行BACKUPDATABASEINCREMENTALLEVEL1format'/data/yasdb_back/bac......
  • [20241230]21c HIST_HEAD$ UNIFIED AUDIT.txt
    [20241230]21cHIST_HEAD$UNIFIEDAUDIT.txt--//看标题有点奇怪,生产系统19c遇到的问题,在我的测试环境21c也存在,就是访问ALL_TAB_COLS,ALL_TAB_COLUMNS视图时会访问--//HIST_HEAD$表,会触发审计记录相关信息,有点奇怪,做一个记录并分析。1.环境:SYS@book01p>@ver2==================......
  • 【YashanDB知识库】python驱动查询gbk字符集崖山数据库CLOB字段,数据被驱动截断
    本文内容来自YashanDB官网,原文内容请见https://www.yashandb.com/newsinfo/7849012.html?templateId=1718516【标题】python驱动查询gbk字符集崖山数据库CLOB字段,数据被驱动截断【关键字】python驱动,gbk服务端,崖山数据库【问题描述】使用python驱动查询gbk字符集数据库,数据被......