Debezium-增量迁移之 Oracle 迁移所需权限

-- 创建用户
create user TCK identified by oracle;
-- 赋权
grant connect,resource to TCK;
-- 删除权限
revoke select any table from TCK;
revoke select any DICTIONARY from TCK;
-- 删除用户 CASCADE(用户下的数据级联删除)
drop user TCK CASCADE

-- 查询权限列表
select * from user_sys_privs where privilege in ('SELECT ANY TABLE','SELECT ANY DICTIONARY')
select * from user_role_privs;
select * from user_sys_privs  where PRIVILEGE ='SELECT ANY TABLE';
SELECT * FROM user_tab_privs;

-- 创建数据源必须权限
grant SELECT ANY TABLE to TCK; -- 查询所有库表权限
grant SELECT ANY DICTIONARY to TCK; -- 查询用户所在库权限 与上个二选一
grant analyze any to TCK;  -- 获取统计信息的权限

-- 预校验必须权限
grant SELECT ANY TABLE to TCK; -- 查询所有库表权限
grant SELECT ANY DICTIONARY to TCK; -- 查询用户所在库权限 与上个二选一
grant analyze any to TCK;  -- 获取统计信息的权限

-- Oracle全量迁移必须权限列表
grant SELECT ANY TABLE to TCK; -- 查询所有库表权限
grant analyze any to TCK;  -- 获取统计信息的权限
grant select_catalog_role to TCK;  -- 获取DDL的权限

-- Oracle增量迁移必须权限列表
grant SELECT ANY TABLE to TCK; -- 查询所有库表权限
grant analyze any to TCK;  -- 获取统计信息的权限
grant select_catalog_role to TCK;  -- 获取DDL的权限
grant execute on dbms_flashback to TCK; -- 获取binlog起始点位的权限
grant EXECUTE_CATALOG_ROLE to TCK; -- debezium增量需要权限
grant select any dictionary to TCK; -- debezium增量需要权限
grant execute on dbms_flashback to TCK; -- debezium增量需要权限
grant flashback any table  to TCK; -- debezium增量需要权限
grant select any transaction to TCK; -- debezium增量需要权限 

grant execute on dbms_flashback to oracle_whcs;
grant select_catalog_role to oracle_whcs;

SELECT VERSION FROM V$INSTANCE
grant SELECT ANY DICTIONARY to TCK;

你可能感兴趣的:(oracle,数据库,Debezium,java)