This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathoracle_changes.txt
94 lines (65 loc) · 2.06 KB
/
oracle_changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# archive dir
su - oracle
mkdir -p /oracle/archives/test
# allow oracle user to generate spool files
su - ggate
chmod 775 /oracle/product/12.1.2/ggate
# db
su - oracle
# cd for SQL scripts
cd /oracle/product/12.1.2/ggate/
export ORAENV_ASK=NO;
export ORACLE_SID=test;
. oraenv
sqlplus /nolog
connect / as sysdba
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
alter system set log_archive_dest_1='LOCATION=/oracle/archives/test' scope=both;
alter system set ENABLE_GOLDENGATE_REPLICATION=true scope=both;
alter system set undo_retention=86400 scope=both;
alter user hr account unlock;
alter user hr identified by hr;
// check
SELECT supplemental_log_data_min, force_logging FROM v$database;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE FORCE LOGGING;
ALTER SYSTEM SWITCH LOGFILE;
create tablespace ggate
logging
datafile '/oracle/oradata/test/ggate01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
CREATE USER GGATE_ADMIN identified by GGATE_ADMIN
DEFAULT TABLESPACE ggate
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON GGATE;
GRANT CREATE SESSION, ALTER SESSION to GGATE_ADMIN;
GRANT ALTER SYSTEM TO GGATE_ADMIN;
GRANT CONNECT, RESOURCE to GGATE_ADMIN;
GRANT SELECT ANY DICTIONARY to GGATE_ADMIN;
GRANT FLASHBACK ANY TABLE to GGATE_ADMIN;
#GRANT SELECT ANY TABLE TO GGATE_ADMIN;
GRANT SELECT ON DBA_CLUSTERS TO GGATE_ADMIN;
GRANT EXECUTE ON DBMS_FLASHBACK TO GGATE_ADMIN;
GRANT SELECT ANY TRANSACTION To GGATE_ADMIN;
GRANT SELECT ON SYS.V_$DATABASE TO GGATE_ADMIN;
EXEC DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('GGATE_ADMIN');
/
GRANT FLASHBACK ANY TABLE TO GGATE_ADMIN;
GRANT SELECT ON HR.REGIONS to GGATE_ADMIN;
GRANT SELECT ON HR.DEPARTMENTS to GGATE_ADMIN;
GRANT SELECT ON HR.JOBS to GGATE_ADMIN;
GRANT SELECT ON HR.EMPLOYEES to GGATE_ADMIN;
GRANT SELECT ON HR.JOB_HISTORY to GGATE_ADMIN;
GRANT SELECT ON HR.COUNTRIES to GGATE_ADMIN;
GRANT SELECT ON HR.LOCATIONS to GGATE_ADMIN;
@marker_setup.sql
@ddl_setup.sql
@role_setup.sql
GRANT GGS_GGSUSER_ROLE TO GGATE_ADMIN;
@ddl_enable