Skip to content

Commit d0bbf61

Browse files
author
Marcin Przepiorowski
committed
Merge branch 'env_source_user_list' into develop
2 parents 6813c2c + 4bc058d commit d0bbf61

12 files changed

+518
-262
lines changed

CHANGELOG.md

+92-93
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,155 @@
1+
## 2.4.24
2+
3+
### Added
4+
- Added support to list environment users.
5+
- Added support to list environment databases.
6+
- Fixed self-service snapshot list issue in dx_get_js_snapshots
7+
- Fixed dx_ctl_env to prevent adding same database twice for PostgreSQL
8+
19
## 2.4.23
210

311
### Added
4-
- Support for Postgresql ( dSource / VDB )
12+
- Support for PostgreSQL (dSource/VDB)
513
- Data patch flag added for Oracle VDBs
614

715
## 2.4.22.1
816

917
### Changes
10-
- Fix to support backupuuid in dx_snapshot_db
11-
- Fix to support dots in the user names while using @DOMAIN or @SYSTEM
18+
- Fix to support backup UUID in dx_snapshot_db
19+
- Fix to support dots in usernames while using @DOMAIN or @SYSTEM
1220

1321
## 2.4.22
1422

1523
### Added
16-
- flag -cluster for dx_get_env and dx_get_db_env to display a cluster nodes for dSources and VDBs
17-
- support for Amazon Linux 2023
24+
- Flag -cluster for dx_get_env and dx_get_db_env to display cluster nodes for dSources and VDBs
25+
- Support for Amazon Linux 2023
1826

19-
### Changes:
20-
- fix for dx_set_envpass to support MSSQL source environments
21-
- [bug #234](https://github.com/delphix/dxtoolkit/issues/234) - dx_ctl_user - fix for setting principal
27+
### Changes
28+
- Fix for dx_set_envpass to support MSSQL source environments
29+
- [Bug #234](https://github.com/delphix/dxtoolkit/issues/234) - dx_ctl_user - fix for setting principal
2230

2331
## 2.4.21.1
2432

25-
### Changes:
26-
- group name added to dx_get_vdbthroughput - new parameter fullname
33+
### Changes
34+
- Group name added to dx_get_vdbthroughput - new parameter fullname
2735

2836
## 2.4.21
2937

3038
### Added
31-
- support for object level stats in the dx_get_capacity_history
39+
- Support for object level stats in dx_get_capacity_history
3240

33-
### Changes:
34-
- compability with new engines (up to 16)
35-
- fixes in the timestamp support (-st) and (-et)
41+
### Changes
42+
- Compatibility with new engines (up to 16)
43+
- Fixes in the timestamp support (-st) and (-et)
3644

3745
## 2.4.20
3846

3947
### Added
40-
- support for Staging push ( MS SQL / Oracle )
41-
- [bug #232](https://github.com/delphix/dxtoolkit/issues/232) - dx_snapshot_db supports staging push
48+
- Support for Staging push (MS SQL/Oracle)
49+
- [Bug #232](https://github.com/delphix/dxtoolkit/issues/232) - dx_snapshot_db supports staging push
4250

43-
### Changes:
44-
- [bug #230](https://github.com/delphix/dxtoolkit/issues/232) - example files location
45-
- compability with new engines (up to 12)
51+
### Changes
52+
- [Bug #230](https://github.com/delphix/dxtoolkit/issues/232) - Example files location
53+
- Compatibility with new engines (up to 12)
4654

4755
## 2.4.19.2
4856

4957
### Added
50-
- [bug #224](https://github.com/delphix/dxtoolkit/issues/224) - dx_get_hierarchy - print parent name
58+
- [Bug #224](https://github.com/delphix/dxtoolkit/issues/224) - dx_get_hierarchy - print parent name
5159

5260
## 2.4.19
5361

54-
### Changes:
55-
- [bug #227](https://github.com/delphix/dxtoolkit/issues/227) - snapshot order fixed
56-
- [bug #226](https://github.com/delphix/dxtoolkit/issues/226) - link / unlink (attach / detech) works for vPDB and CDB
57-
- build fixes
62+
### Changes
63+
- [Bug #227](https://github.com/delphix/dxtoolkit/issues/227) - Snapshot order fixed
64+
- [Bug #226](https://github.com/delphix/dxtoolkit/issues/226) - Link/unlink (attach/detach) works for vPDB and CDB
65+
- Build fixes
5866

5967
### Added
60-
- [bug #225](https://github.com/delphix/dxtoolkit/issues/225) - support for vPDB/vCDB with TDE
61-
68+
- [Bug #225](https://github.com/delphix/dxtoolkit/issues/225) - Support for vPDB/vCDB with TDE
6269

6370
## 2.4.18
6471

6572
### Added
66-
- [bug #206](https://github.com/delphix/dxtoolkit/issues/206) - dsource hooks support
67-
- [bug #217](https://github.com/delphix/dxtoolkit/issues/217) - dx_ctl_namespace added with option to failover and delete a namespace
68-
- [bug #220](https://github.com/delphix/dxtoolkit/issues/220) - Support for different metrics - MB/TB/GB/KB added to commands displaying space
69-
70-
71-
72-
### Changes:
73-
- [bug #223](https://github.com/delphix/dxtoolkit/issues/223) - dx_ctl_js_container fix with return code
74-
- [bug #222](https://github.com/delphix/dxtoolkit/issues/222) - db_get_db_env backup is now generating proper output for masked child VDB
75-
- [bug #221](https://github.com/delphix/dxtoolkit/issues/221) - dbname for Oracle PDB can be now up to 30 characters
76-
- build fixes
77-
73+
- [Bug #206](https://github.com/delphix/dxtoolkit/issues/206) - dSource hooks support
74+
- [Bug #217](https://github.com/delphix/dxtoolkit/issues/217) - dx_ctl_namespace added with options to failover and delete a namespace
75+
- [Bug #220](https://github.com/delphix/dxtoolkit/issues/220) - Support for different metrics (MB/TB/GB/KB) added to commands displaying space
7876

77+
### Changes
78+
- [Bug #223](https://github.com/delphix/dxtoolkit/issues/223) - dx_ctl_js_container fix with return code
79+
- [Bug #222](https://github.com/delphix/dxtoolkit/issues/222) - dx_get_db_env backup is now generating proper output for masked child VDB
80+
- [Bug #221](https://github.com/delphix/dxtoolkit/issues/221) - dbname for Oracle PDB can now be up to 30 characters
81+
- Build fixes
7982

8083
## 2.4.17.2
8184

82-
### Changes:
85+
### Changes
8386
- dx_v2p - fix for MS SQL database to support file mapping
84-
- Fix for various commands for better support of Delphix Engine timezones ( ex. dx_get_jobs and similar )
87+
- Fix for various commands for better support of Delphix Engine timezones (e.g., dx_get_jobs and similar)
8588

8689
## 2.4.17
8790

8891
<B>Breaking change</B>
89-
If dx_ctl_replication script is used please review your scipts
90-
and add <i>-action replicate</i> to keep current functionality
92+
If dx_ctl_replication script is used, please review your scripts and add <i>-action replicate</i> to keep current functionality.
9193

9294
### Changes
9395

94-
- dx_ctl_replication - <b>Breaking change</b> - More functionality (create/update/delete profile) has been added and parameter <i>-action</i> is required
95-
- dx_get_replication - backup of the replication profiles has been added
96-
- dx_get_osversion - fix
97-
- dx_get_config - backup of engine configuration to the JSON file has been added
98-
- fix to issue with some database names / comments
99-
- [bug #218](https://github.com/delphix/dxtoolkit/issues/218) - fix in dx_v2p
100-
- [bug #214](https://github.com/delphix/dxtoolkit/issues/214) - fix to no of CPU
101-
- [bug #208](https://github.com/delphix/dxtoolkit/issues/208) - fix to limited user privileges
96+
- dx_ctl_replication - <b>Breaking change</b> - More functionality (create/update/delete profile) has been added, and parameter <i>-action</i> is required
97+
- dx_get_replication - backup of the replication profiles has been added
98+
- dx_get_osversion - fix
99+
- dx_get_config - backup of engine configuration to the JSON file has been added
100+
- Fix to issue with some database names/comments
101+
- [Bug #218](https://github.com/delphix/dxtoolkit/issues/218) - Fix in dx_v2p
102+
- [Bug #214](https://github.com/delphix/dxtoolkit/issues/214) - Fix to number of CPU
103+
- [Bug #208](https://github.com/delphix/dxtoolkit/issues/208) - Fix to limited user privileges
102104

103105
### Added
104106

105-
- dx_ctl_config - initialise and configure engine using JSON file
106-
- dx_get_namespace - list all replicated namespace
107-
- dx_ctl_namespace - failover or delete namespace
107+
- dx_ctl_config - initialize and configure engine using JSON file
108+
- dx_get_namespace - list all replicated namespaces
109+
- dx_ctl_namespace - failover or delete namespace
110+
108111
## 2.4.16.3
109112

110113
### Changes
111114

112-
- fix to disable debug data in various scripts
113-
- [bug #215](https://github.com/delphix/dxtoolkit/issues/215) - v2p for MS SQL fix for 6.0.14 and higher
115+
- Fix to disable debug data in various scripts
116+
- [Bug #215](https://github.com/delphix/dxtoolkit/issues/215) - v2p for MS SQL fix for 6.0.14 and higher
117+
114118
## 2.4.16.2
115119

116120
### Added
117121

118122
- dx_get_osversion - will report an upgrade verification status
119-
- dx_get_appliance - will show UUID and engine type (masking / virtualisation )
123+
- dx_get_appliance - will show UUID and engine type (masking/virtualization)
120124

121125
## 2.4.16.0
122126

123127
### Added
124128

125129
- dx_get_db_env has a new column showing last VDB refresh time
126-
- TDE support for an Oracle MT
130+
- TDE support for Oracle MT
127131
- OAuth2 support - Bearer token access
128132

129-
130133
### Changed
131-
- dx_get_vdbsize - documentation fix
132-
- dx_ctl_env - set TDE password for CDB
133-
- dx_provision_db - support for Oracle MT TDE
134-
- dx_get_osversion - print upgrade verification results
134+
- dx_get_vdbsize - documentation fix
135+
- dx_ctl_env - set TDE password for CDB
136+
- dx_provision_db - support for Oracle MT TDE
137+
- dx_get_osversion - print upgrade verification results
135138

136139
## 2.4.15.1
137140

138141
### Added
139-
- [enhancement #194](https://github.com/delphix/dxtoolkit/issues/194) Last refresh date added to dx_get_db_env as a new column
140-
- dx_get_source_info is displaying now a status for Validated Sync opertion for MS SQL and Sybase
142+
- [Enhancement #194](https://github.com/delphix/dxtoolkit/issues/194) - Last refresh date added to dx_get_db_env as a new column
143+
- dx_get_source_info now displays a status for Validated Sync operation for MS SQL and Sybase
141144
- dx_get_db_env has a new column showing last VDB refresh time
142145
- dx_get_vdbsize - new script to display total storage used by VDB
143146

144-
145147
### Changed
146-
- [bug #197](https://github.com/delphix/dxtoolkit/issues/197) dx_get_db_env is displaying now a parent snapshot / time of the parent dSource / VDB - not a rollback one
147-
- [bug #185](https://github.com/delphix/dxtoolkit/issues/185) dx_get_db_env is not displaying errors for replicated objects
148-
- [bug #190](https://github.com/delphix/dxtoolkit/issues/190) dx_provision_db works with None snapshot policy
149-
- [bug #198](https://github.com/delphix/dxtoolkit/issues/198) dx_get_source_info failing with vFiles dSources
150-
- [bug #199](https://github.com/delphix/dxtoolkit/issues/199) reserved space added to dx_get_appliance
151-
148+
- [Bug #197](https://github.com/delphix/dxtoolkit/issues/197) - dx_get_db_env is now displaying a parent snapshot/time of the parent dSource/VDB - not a rollback one
149+
- [Bug #185](https://github.com/delphix/dxtoolkit/issues/185) - dx_get_db_env is not displaying errors for replicated objects
150+
- [Bug #190](https://github.com/delphix/dxtoolkit/issues/190) - dx_provision_db works with None snapshot policy
151+
- [Bug #198](https://github.com/delphix/dxtoolkit/issues/198) - dx_get_source_info failing with vFiles dSources
152+
- [Bug #199](https://github.com/delphix/dxtoolkit/issues/199) - Reserved space added to dx_get_appliance
152153

153154
## 2.4.14.1
154155

@@ -161,43 +162,41 @@ and add <i>-action replicate</i> to keep current functionality
161162

162163
### Added
163164

164-
- support for 6.0.11 engine
165-
- dx_ctl_engine_upgrade - action apply allows to select upgrade type - deferred or full
166-
- dx_ctl_engine_upgrade - action delete allows to delete old OS
167-
- dx_get_db_env new flag to speed up a command output for engines with many snapshots - dx_get_db_env -snappervdb
168-
- new filter based on repository name ( ORACLE_HOME, MS SQL instance, etc) added to dx_get_db_env and dx_ctl_db
165+
- Support for 6.0.11 engine
166+
- dx_ctl_engine_upgrade - action apply allows selection of upgrade type - deferred or full
167+
- dx_ctl_engine_upgrade - action delete allows deletion of old OS
168+
- dx_get_db_env - new flag to speed up command output for engines with many snapshots - dx_get_db_env -snappervdb
169+
- New filter based on repository name (ORACLE_HOME, MS SQL instance, etc.) added to dx_get_db_env and dx_ctl_db
169170

170171
### Changed
171-
- dx_ctl_engine_upgrade apply action fixed - it monitors now a whole upgrade process, including engine reboot
172-
- [fix for #195](https://github.com/delphix/dxtoolkit/issues/195) - this was generic issue with snapshot paging
173-
- [fix for #193](https://github.com/delphix/dxtoolkit/issues/193) - dx_get_env creates different envtype than what dx_create_env expects
174-
- fix for backup metadata in dx_get_db_env
175-
- fix for printing hierarchy in dx_get_hierarchy for objects with same reference across 2 engines
176-
172+
- dx_ctl_engine_upgrade apply action fixed - it now monitors the whole upgrade process, including engine reboot
173+
- [Fix for #195](https://github.com/delphix/dxtoolkit/issues/195) - generic issue with snapshot paging
174+
- [Fix for #193](https://github.com/delphix/dxtoolkit/issues/193) - dx_get_env creates a different envtype than what dx_create_env expects
175+
- Fix for backup metadata in dx_get_db_env
176+
- Fix for printing hierarchy in dx_get_hierarchy for objects with the same reference across two engines
177177

178178
## 2.4.13
179179

180180
### Added
181181
- Support for Commvault in adding MSSQL dSource
182182

183183
### Changed
184-
- remove bookmark in self service fix
185-
- fix for snapshot size reporting
186-
184+
- Remove bookmark in self-service fix
185+
- Fix for snapshot size reporting
187186

188187
## 2.4.12
189188

190189
### Added
191-
- skipdefault flag added to dx_ctl_policy to skip updating existing default polices
192-
- [fix for #180](https://github.com/delphix/dxtoolkit/issues/180) - exclude parameter added to dx_ctl_dsource to ingest vfiles with exclude list
193-
- support for password passed through environment variable - see example config file
194-
- support for password passed via external script - see example config file
190+
- Skipdefault flag added to dx_ctl_policy to skip updating existing default policies
191+
- [Fix for #180](https://github.com/delphix/dxtoolkit/issues/180) - Exclude parameter added to dx_ctl_dsource to ingest vFiles with exclude list
192+
- Support for password passed through environment variable - see example config file
193+
- Support for password passed via external script - see example config file
195194

196195
### Changed
197-
- fix for applying policy to group
198-
- fix to uploading upgrade in engines in version 6.0.X
199-
- fix for same users in DOMAIN and SYSTEM with dash in name
200-
- [fix for #181](https://github.com/delphix/dxtoolkit/issues/181) Fix for disable / enbable LogSync
196+
- Fix for applying policy to group
197+
- Fix to uploading upgrade in engines in version 6.0.X
198+
- Fix for same users in DOMAIN and SYSTEM with dash in the name
199+
- [Fix for #181](https://github.com/delphix/dxtoolkit/issues/181) - Fix for disable/enable LogSync
201200

202201
## 2.4.11
203202

bin/dx_ctl_env.pl

+25
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,31 @@
412412
my %plugin_params_hash = (
413413
"name" => $dbname
414414
);
415+
416+
my $dbarray = $sourceconfig_obj->getSourceConfigsListForRepo($repo->{reference});
417+
my $sourceconfig;
418+
my $existing_db_name;
419+
my $db_exist = 0;
420+
421+
for my $dbitem (@{$dbarray}) {
422+
$sourceconfig = $sourceconfig_obj->getSourceConfig($dbitem);
423+
if (defined($sourceconfig->{'toolkit'})) {
424+
$existing_db_name = $sourceconfig_obj->getName($dbitem);
425+
} else {
426+
$existing_db_name = $sourceconfig_obj->getSourceConfig($dbitem)->{'databaseName'};
427+
}
428+
if ($dbname eq $existing_db_name) {
429+
print "Database $dbname already exist. Skipping\n";
430+
$ret = $ret + 1;
431+
$db_exist = 1;
432+
last;
433+
}
434+
}
435+
436+
if ($db_exist == 1) {
437+
next;
438+
}
439+
415440
if ($sourceconfig_obj->createSourceConfig('plugin', $repo->{reference}, $dbname, \%native_params, \%plugin_params_hash)) {
416441
print "Can't add Postgresql $dbname \n";
417442
$ret = $ret + 1;

0 commit comments

Comments
 (0)