sqlplus / as sysdba
alter session set container=pdb;
-- 生成授予用户所有表查询权限的 SQL 语句
set pagesize 0 long 10000 echo off heading off feedback off
select 'grant select on <username>.' || table_name || ' to <query_username>;' from dba_tables where owner='<username>';
--将以上执行输出作为命令执行授权
-- 查询授权情况
col grantee for a10
col owner for a10
col table_name for a30
col grantor for a10
col privilege for a10
set lines 200
select * from dba_tab_privs where grantee='<query_username>';