75
75
' all' => (\my $all ),
76
76
' version' => \(my $print_version ),
77
77
' configfile|c=s' => \(my $config_file )
78
- );
78
+ ) or pod2usage(- verbose => 1, - input => \* DATA ) ;
79
79
80
80
81
81
93
93
exit (1);
94
94
}
95
95
96
- if ( ! ( defined ($type ) && defined ($sourcename ) && defined ( $targetDirectory ) && defined ($dbname ) && defined ($environment ) && defined ($timestamp ) && defined ($envinst ) ) ) {
97
- print " Options -type, -sourcename, -targetDirectory, - dbname, -environment, -timestamp and -envinst are required. \n " ;
96
+ if ( ! ( defined ($type ) && defined ($sourcename ) && defined ($dbname ) && defined ($environment ) && defined ($timestamp ) && defined ($envinst ) ) ) {
97
+ print " Options -type, -sourcename, -dbname, -environment, -timestamp and -envinst are required. \n " ;
98
98
pod2usage(-verbose => 1, -input => \*DATA );
99
99
exit (1);
100
100
}
106
106
}
107
107
108
108
109
+ if ( ( ( $type eq ' oracle' ) || ( $type eq ' mssql' ) ) && (! defined ($targetDirectory )) ) {
110
+ print " Option targetDirectory is required. \n " ;
111
+ pod2usage(-verbose => 1, -input => \*DATA );
112
+ exit (1);
113
+ }
114
+
115
+
109
116
# this array will have all engines to go through (if -d is specified it will be only one engine)
110
117
my $engine_list = Toolkit_helpers::get_engine_list($all , $dx_host , $engine_obj );
111
118
166
173
}
167
174
168
175
$db -> setName($dbname , $dbname );
169
- if ( $db -> setFileSystemLayout($targetDirectory ,$archiveDirectory ,$dataDirectory ,$externalDirectory ,$scriptDirectory ,$tempDirectory ) ) {
170
- print " Problem with export file system layout. Is targetDiretory and dataDirectory set ?\n " ;
171
- exit (1);
172
- }
173
176
174
177
175
178
if ( $type eq ' oracle' ) {
179
+
180
+ if ( $db -> setFileSystemLayout($targetDirectory ,$archiveDirectory ,$dataDirectory ,$externalDirectory ,$scriptDirectory ,$tempDirectory ) ) {
181
+ print " Problem with export file system layout. Is targetDiretory and dataDirectory set ?\n " ;
182
+ exit (1);
183
+ }
184
+
176
185
if ( defined ($template ) ) {
177
186
if ( $db -> setTemplate($template ) ) {
178
187
print " Template $template not found. V2P process won't be created\n " ;
208
217
209
218
}
210
219
elsif ($type eq ' mssql' ) {
220
+
221
+ if ( $db -> setFileSystemLayout($targetDirectory ,$archiveDirectory ,$dataDirectory ,$externalDirectory ,$scriptDirectory ,$tempDirectory ) ) {
222
+ print " Problem with export file system layout. Is targetDiretory and dataDirectory set ?\n " ;
223
+ exit (1);
224
+ }
225
+
211
226
if (defined ($norecovery )) {
212
227
$db -> setNoRecovery();
213
228
}
@@ -235,18 +250,24 @@ =head1 SYNOPSIS
235
250
-sourcename src_name
236
251
-dbname db_name
237
252
-environment environment_name
238
- -type oracle|mssql
239
- -envinst OracleHome/MSSQLinstance
240
- -targetDirectory target_directory
241
- [ -timestamp LATEST_SNAPSHOT|LATEST_POINT|time_stamp]
242
- [ -template template_name]
243
- [ -mapfile mapping_file]
244
- [ -instname SID]
245
- [ -uniqname db_unique_name]
246
- [ -archiveDirectory arch_directory]
247
- [ -dataDirectory data_dir]
248
- [ -externalDirectory external_dir]
249
- [ -tempDirectory temp_dir]
253
+ -type oracle|mssql|sybase
254
+ -envinst OracleHome/MSSQLinstance/SybaseInstance
255
+ [ -targetDirectory target_directory ]
256
+ [ -timestamp LATEST_SNAPSHOT|LATEST_POINT|time_stamp ]
257
+ [ -template template_name ]
258
+ [ -mapfile mapping_file ]
259
+ [ -norecovery ]
260
+ [ -noopen ]
261
+ [ -instname SID ]
262
+ [ -uniqname db_unique_name ]
263
+ [ -archiveDirectory arch_directory ]
264
+ [ -dataDirectory data_dir ]
265
+ [ -externalDirectory external_dir ]
266
+ [ -tempDirectory temp_dir ]
267
+ [ -dspconnections=n ]
268
+ [ -dspusecompression ]
269
+ [ -dspuseencryption ]
270
+ [ -concurrentfiles=n ]
250
271
[ -help]
251
272
[ -debug]
252
273
@@ -277,13 +298,13 @@ =head2 V2P arguments
277
298
Type (oracle|mssql)
278
299
279
300
=item B<-sourcename >
280
- dSource/VDB Name
301
+ dSource/VDB Name of database being move to physical
281
302
282
303
=item B<-targetDirectory >
283
- Target directory
304
+ Target directory (mandatory for an Oracle and MS SQL)
284
305
285
306
=item B<-dbname >
286
- Target database name
307
+ Physical database name
287
308
288
309
=item B<-timestamp >
289
310
Time stamp for export format (YYYY-MM-DD HH24:MI:SS) or LATEST_POINT or LATEST_SNAPSHOT
@@ -319,6 +340,25 @@ =head2 V2P arguments
319
340
=item B<-temp >
320
341
Temp directory
321
342
343
+ =item B<-norecovery >
344
+ Do not run recovery (for MS SQL and Sybase only)
345
+
346
+ =item B<-noopen >
347
+ Do not open a database after migration (for an Oracle only)
348
+
349
+ =item B<-dspconnections=n >
350
+ Set number of DSP connections (for an Oracle only)
351
+
352
+ =item B<-dspusecompression >
353
+ Enable DSP compression (for an Oracle only)
354
+
355
+ =item B<-dspuseencryption >
356
+ Enable DSP encryption (for an Oracle only)
357
+
358
+ =item B<-concurrentfiles=n >
359
+ Set number of concurrent files being copy (for an Oracle only)
360
+
361
+
322
362
=back
323
363
324
364
@@ -344,14 +384,21 @@ =head1 EXAMPLES
344
384
Job JOB-231 finised with state: COMPLETED
345
385
V2P job finished with COMPLETED status.
346
386
347
- MS SQL V2P proces
387
+ MS SQL V2P process
348
388
349
389
dx_v2p -d Landshark43 -sourcename autotest -environment WINDOWSTARGET -type mssql -envinst MSSQL2012 -dbname v2p -targetDirectory "c:\temp"
350
390
Starting provisioning job - JOB-832
351
391
0 - 1 - 5 - 10 - 20 - 80 - 100
352
392
Job JOB-832 finised with state: COMPLETED
353
393
V2P job finished with COMPLETED status.
354
394
395
+ Sybase V2P process ( database SYBV2P has to be precreated with for load option )
396
+
397
+ dx_v2p -d Landshark51 -type sybase -timestamp LATEST_SNAPSHOT -sourcename testsys -dbname SYBV2P -environment LINUXTARGET -envinst LINUXTARGET
398
+ Starting provisioning job - JOB-5025
399
+ 0 - 8 - 9 - 30 - 60 - 90 - 92 - 100
400
+ Job JOB-5025 finished with state: COMPLETED
401
+ V2P finished..
355
402
356
403
=cut
357
404
0 commit comments