GV$OB_SQL_AUDIT视图中没有FORMAT_SQL_ID字段,是为什么呢

我安装的社区版4.2.1 ,
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 1401742650
Server version: OceanBase_CE 4.2.1.8 (r108000022024072217-3149c25ca2dadbb7707686ad02a1367b1b43e0b5) (Built Jul 23 2024 02:01:58)

在查询format_sql_id的时候发现没有这个字段,但是官方文档却说有?是怎么回事?
是社区版的的限制吗?

obclient(root@tenant1)[(none)]> use oceanbase;
Database changed
obclient(root@tenant1)[oceanbase]> Select FORMAT_SQL_ID from GV$OB_SQL_AUDIT;
ERROR 1054 (42S22): Unknown column ‘FORMAT_SQL_ID’ in ‘field list’
obclient(root@tenant1)[oceanbase]> Select format_sql_id from GV$OB_SQL_AUDIT;
ERROR 1054 (42S22): Unknown column ‘format_sql_id’ in ‘field list’
obclient(root@tenant1)[oceanbase]> Select sql_id from GV$OB_SQL_AUDIT limit 1;

1 个赞

你从哪个文档看到gv$ob_sql_aduit有format_sql_id字段。。

https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000220956

1 个赞

421版本没有这个字段,从422版本之后才有的这个字段

2 个赞

好细节


https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000003380676

老师您可以在这个页面搜索format_sql_id就能看到。

你安装的是4.2.1,这个是4.4.0的文档而且要sys租户的gv$ob_sql_audit才有这个字段