oracle 开启logminer
Last updated on January 17, 2025 am
🧙 Questions
oracle开启logminer
☄️ Ideas
通过docker进入oracle
docker exec -it isxcode-oracle bash
# helowin
su root
su - oracle
sqlplus /nolog
conn /as sysdba
打开日志备份功能
-- NOARCHIVELOG 表示没有开启
SELECT log_mode FROM v$database;
-- 用以下命令重新启动数据库,开启日志
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
-- 再次检查是否开启
SELECT log_mode FROM v$database;
开启Supplemental Logging
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER SYSTEM SWITCH LOGFILE;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
检测是否开启
conn /as sysdba;
SELECT supplemental_log_data_min, supplemental_log_data_pk, supplemental_log_data_all FROM v$database;
给指定用户开启
GRANT create session, alter session, execute_catalog_role, select any dictionary, select any transaction, select any table, create any table, create any index, unlimited tablespace to FORZH;
conn ispong/ispong123;
SELECT supplemental_log_data_min, supplemental_log_data_pk, supplemental_log_data_all FROM v$database;
🔗 Links
oracle 开启logminer
https://ispong.isxcode.com/db/oracle/oracle 开启logminer/