DDL安装
1. 确定DDL SCHEMA
需要配置在GLOBALS中:GGSCHEMA odc
2.
GRANT EXECUTE ON UTL_FILE TO odc;
3.
为odc_DDL_HIST、 odc_MARKER等表准备表空间,如果空间不足,会导致数据库无法进行DDL,从而影响业务。
alter user odc default tablespace QUERY_SERVER;
create tablespace QUERY_SERVER datafile '/u01/oradata/cprdv3/QUERY_SERVER01.dbf' size 200M autoextend on;
4.sqlplus "/as sysdba" ----必须sysdba连入
5.@marker_setup
6. @ddl_setup
该脚本会提示你所有打开的会话,要求关闭。
提示输入DDL SCHEMA;
选择安装类型:INITIALSETUP
alter system set recyclebin=off;
7. @role_setup
提示你执行一条GRANT语句,执行即可!
8. @ddl_enable.sql
提高DDL性能脚本: -----需要dbms_shared_pool包
SQL> @ddl_pin odc
DDL卸载
1、进入GoldenGate安装目录,运行ggsci.exe
2、关闭运行中的进程
info all
stop *
stop mgr
3、退出ggsci.exe,从ogg目录进入 sqlplus
sqlplus "/as sysdba"
4、运行ddl_disable.sql脚本来禁用DDL触发器
SQL> @ddl_disable.sql
触发器已更改
5、运行ddl_remove.sql脚本来移除GoldenGate DDL触发器、DDL历史和标记表以及其他相关的对象。
注意:Enter Oracle GoldenGate schema name:处输入DDL信息所在用户
SQL> @ddl_remove.sql
DDL replication removal script.
WARNING: this script removes all DDL replication objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:ggs
Working, please wait ...
Spooling to file ddl_remove_spool.txt
Script complete.
6、运行marker_remove.sql脚本来移除GoldenGate marker支持系统。
SQL> @marker_remove.sql
Marker removal script.
WARNING: this script removes all marker objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:ggs
PL/SQL 过程已成功完成。
序列已删除。
表已删除。
Script complete.
7、如果用户是专门用来存放DDL信息的,可以删除用户
SQL> drop user ggs cascade;
用户已删除
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29956245/viewspace-3011315/
,如需转载,请注明出处,否则将追究法律责任。