You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/fa_pg_ora_snap_remote/README.md
+81-90Lines changed: 81 additions & 90 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This Python code imports the [fa_pg_ora_snap.py](../fa_pg_ora_snap/) code.
21
21
-r replicate the snapshot to the targets specified in the source protection group (optional)\
22
22
-o startup mode of the target database (OPEN, MOUNTED, STARTED or DOWN)\
23
23
-b use oracle backup mode (optional - defaults to no)
24
-
-i ignore tag (optional - see below)\
24
+
-i ignore tag (override established source/target volume pairing for cloning - see fa_pg_ora_snap.py for more details)\
25
25
-x execute lock - if this is NOT set, no destructive actions will be taken. Instead, the script will simply tell you would it would do. This may prove useful to make sure you have all the settings right before you overwrite a target protection group.\
26
26
Note - many database parameters must be specified in the JSON file - see below:
27
27
@@ -35,10 +35,29 @@ Note - many database parameters must be specified in the JSON file - see below:
35
35
* tgt_protection_group - Pure Flash Array protection group that includes all ASM disks in the target database (optional - if cloning database).
36
36
* rescan_scsi_bus - how to scan for new ASM disks (two examples are included in the repository)
37
37
* oracle_target_mode - requested state of cloned database (OPEN, DOWN, STARTED or MOUNTED) - overriden by the command line option
38
+
39
+
* def_user_oracle - default oracle username is no other provided
40
+
* def_passwd_oracle - default oracle password is no other provided
41
+
* def_user_grid - default grid username is no other provide. defaults to oracle
42
+
* def_passwd_grid - default grid password is no other provide.
43
+
* def_asm - default ASM instance on the target host
44
+
* def_port - default ssh port
45
+
* def_cs_db - default connect string for the target database instance
46
+
* def_cs_asm - default connect string for the target ASM instance
47
+
48
+
* ora_src_usr - source database username
49
+
* ora_src_pwd - source database password
50
+
* ora_src_cs - source database connect string
51
+
* ora_backup_mode - whether to use Oracle backup mode - overriden by command line option
52
+
53
+
* tgt_host - target host to start cloned database on
54
+
* tgt_db - target database name
55
+
* tgt_user_grid - target account username that owns ASM/Grid Infrastructure
56
+
* tgt_pass_grid - target account password that owns ASM/Grid Infrastructure
57
+
* tgt_sid - target SID to mount the clone
58
+
38
59
* local_listener - the listener the target database is to register with
39
60
* db_unique_name - the db_unique_name setting of the cloned database
40
-
* ora_backup_mode - whether to use Oracle backup mode - overriden by command line option
41
-
*
42
61
43
62
# Notes:
44
63
@@ -55,149 +74,121 @@ Tags also include the database ID, database name, if the database was in backup
55
74
56
75
# A Worked Example
57
76
58
-
In the example below, the database SWINGPRD running on a different Linux server has its ASM diskgroups in a Pure Flash Array protection group called gct-oradb-demo-prd01-pg\
59
-
The code will snapshot that protection group, and then overwrite volumes on the local Linux server, where Oracle is also installed. The code will then start the cloned ASM diskgroups, mount the cloned database and open it read-write.
77
+
In the example below, the database SWINGDB is running on Linux server rdmudev01. It has its ASM diskgroups in a Pure Flash Array protection group called gct-oradb-rdmudev01-pg\
78
+
The code will place the source database into backup mode, snapshot that protection group, and then overwrite correspodning volumes on Linux server rdmudev02, where Oracle is also installed. The code will then mount the cloned ASM diskgroups on rdmudev02, mount the cloned database and open it read-write.\
79
+
All of this is exeuted remotely from a scripting host.\
gct-oradb-rdmudev01-pg.dec161217.gct-oradb-rdmudev01-00 will be syncd to gct-oradb-rdmudev02-00
173
+
gct-oradb-rdmudev01-pg.dec161217.gct-oradb-rdmudev01-01 will be syncd to gct-oradb-rdmudev02-01
174
+
============
175
+
rescaning the SCSI bus on target gct-oradb-rdmudev02
176
+
============
177
+
mounting ASM diskgroups on target gct-oradb-rdmudev02
178
+
============
179
+
checking target ASM diskgroups are mounted: SWINGDATA
180
+
ASM diskgroup SWINGDATA mounted on target
191
181
============
192
182
requested state of swingdev is:OPEN
193
183
resetting the target SPFILE
194
184
alter system set db_name='SWINGDB' sid='*' scope=spfile;
195
-
alter system set control_files='+DATA/SWINGDB/CONTROLFILE/current.266.1201708985','+FRA/SJC/CONTROLFILE/current.256.1218830433' sid='*' scope=spfile;
196
-
alter system set db_recovery_file_dest='+FRA' sid='*' scope=spfile;
197
-
alter system set db_recovery_file_dest_size=34359738368 sid='*' scope=spfile;
185
+
alter system set control_files='+SWINGDATA/SWINGDB/CONTROLFILE/current.266.1201708985','+SWINGDATA/SWINGDB/CONTROLFILE/current.265.1201708985' sid='*' scope=spfile;
186
+
alter system set db_recovery_file_dest='/nfsmnt/oradb/recovery/gct-oradb-rdmudev01/swingprd' sid='*' scope=spfile;
187
+
alter system set db_recovery_file_dest_size=107374182400 sid='*' scope=spfile;
198
188
alter system set enable_pluggable_database=FALSE sid='*' scope=spfile;
199
-
alter system set db_unique_name=swingdev sid='*' scope=spfile;
200
-
actual state of swingdev is:OPEN
189
+
restarting instance
190
+
actual state of swingdev on host gct-oradb-rdmudev02 is:OPEN
0 commit comments