v9添加kingbase8的数据源报错com.kingbase8.util.KSQLException: ERROR: permission denied for relation CTP_CONFIG
由 彭 博 在 大约 3 年 之前添加
问题:
2021-11-03 17:09:29 错误 [con.err-Thread 54] com.kingbase8.util.KSQLException: ERROR: permission denied for relation CTP_CONFIG
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2628)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:440)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.jdbc.KbStatement.executeInternal(KbStatement.java:467)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.jdbc.KbStatement.execute(KbStatement.java:389)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:336)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.jdbc.KbStatement.executeCachedSql(KbStatement.java:322)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:299)
2021-11-03 17:09:29 错误 [con.err-Thread 54] at com.kingbase8.jdbc.KbStatement.execute(KbStatement.java:295)
排查过程:
在v9上添加kingbase8的数据源的时候抛出错误,数据源也添加不上去,查看日志看先是数据库驱动抛出权限问题 com.kingbase8.util.KSQLException: ERROR: permission denied for relation CTP_CONFIG
看到用户在管控台上的SQL测试语句select * from ADDRESSBOOK,改成select 1后可以成功。看日志应该是JYUSER用户没有查询这个表的权限。
解决方案:
找金仓的人给当前用户JYUSER添加权限