1.
停止所有进程
stop *
stop mgr
2.
删除OGG目录
rm -rf /u01/app/oracle/ogg
3.
删除用户,触发器
删除触发器
drop trigger ggs_ddl_trigger_before;
https://www.cndba.cn/Expect-le/article/2915
https://www.cndba.cn/Expect-le/article/2915
删除用户
drop user ogg cascade;https://www.cndba.cn/Expect-le/article/2915
https://www.cndba.cn/Expect-le/article/2915
如果报错:
SQL> drop user ogg cascade;
drop user ogg cascade
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-14452: attempt to create, alter or drop an index on temporary table already
in use
解决方法:
查出ogg用户的相关表的死锁,然后kill掉即可。通常是由GGS_STICK引起的
1)
查出OGG用户的表:
SQL> select table_name from dba_tables where owner='OGG';
TABLE_NAME
------------------------------------------------------------
https://www.cndba.cn/Expect-le/article/2915
GGS_SETUP
GGS_TEMP_COLS
GGS_TEMP_UK
GGS_STICK
GGS_DDL_OBJECTS
GGS_DDL_PRIMARY_KEYS
GGS_DDL_PARTITIONS
GGS_DDL_LOG_GROUPS
GGS_DDL_COLUMNS
GGS_DDL_HIST
TABLE_NAME
------------------------------------------------------------
GGS_DDL_HIST_ALT
GGS_DDL_RULES_LOG
GGS_DDL_RULES
14 rows selected.
https://www.cndba.cn/Expect-le/article/2915
2)
查询对应sid,serial#:
select sid, serial# from v$session where sid =
(select sid from v$lock where id1 =
(select object_id from dba_objects where object_name = upper('GGS_STICK')));
https://www.cndba.cn/Expect-le/article/2915
3)
KILL 会话:
alter system kill session 'sid,serial#';
4)
再次删除
drop user oggcascade; https://www.cndba.cn/Expect-le/article/2915
版权声明:本文为博主原创文章,未经博主允许不得转载。
OGG 卸载