1- #
1+ #
22# Licensed under the Apache License, Version 2.0 (the "License");
33# you may not use this file except in compliance with the License.
44# You may obtain a copy of the License at
5- #
5+ #
66# http://www.apache.org/licenses/LICENSE-2.0
7- #
7+ #
88# Unless required by applicable law or agreed to in writing, software
99# distributed under the License is distributed on an "AS IS" BASIS,
1010# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4545my $timestamp = ' LATEST_SNAPSHOT' ;
4646
4747GetOptions(
48- ' help|?' => \(my $help ),
49- ' d|engine=s' => \(my $dx_host ),
48+ ' help|?' => \(my $help ),
49+ ' d|engine=s' => \(my $dx_host ),
5050 ' sourcename=s' => \(my $sourcename ),
51- ' srcgroup=s' => \(my $srcgroup ),
52- ' dbname=s' => \(my $dbname ),
53- ' instname=s' => \(my $instname ),
54- ' uniqname=s' => \(my $uniqname ),
55- ' environment=s' => \(my $environment ),
56- ' type=s' => \(my $type ),
51+ ' srcgroup=s' => \(my $srcgroup ),
52+ ' dbname=s' => \(my $dbname ),
53+ ' instname=s' => \(my $instname ),
54+ ' uniqname=s' => \(my $uniqname ),
55+ ' environment=s' => \(my $environment ),
56+ ' type=s' => \(my $type ),
5757 ' envinst=s' => \(my $envinst ),
5858 ' template=s' => \(my $template ),
5959 ' mapfile=s' => \(my $map_file ),
7171 ' dspusecompression' => \(my $dspusecompression ),
7272 ' dspuseencryption' => \(my $dspuseencryption ),
7373 ' dever=s' => \(my $dever ),
74- ' debug:n' => \(my $debug ),
74+ ' debug:n' => \(my $debug ),
7575 ' all' => (\my $all ),
7676 ' version' => \(my $print_version ),
7777 ' configfile|c=s' => \(my $config_file )
8080
8181
8282pod2usage(-verbose => 2, -input => \*DATA ) && exit if $help ;
83- die " $version \n " if $print_version ;
83+ die " $version \n " if $print_version ;
8484
8585
8686my $engine_obj = new Engine ($dever , $debug );
109109if ( ( ( $type eq ' oracle' ) || ( $type eq ' mssql' ) ) && (! defined ($targetDirectory )) ) {
110110 print " Option targetDirectory is required. \n " ;
111111 pod2usage(-verbose => 1, -input => \*DATA );
112- exit (1);
112+ exit (1);
113113}
114114
115115
116116# this array will have all engines to go through (if -d is specified it will be only one engine)
117- my $engine_list = Toolkit_helpers::get_engine_list($all , $dx_host , $engine_obj );
117+ my $engine_list = Toolkit_helpers::get_engine_list($all , $dx_host , $engine_obj );
118118
119119my $ret = 0;
120120
150150 }
151151
152152 my $source = ($databases -> getDB($source_ref -> [0]));
153-
153+
154154
155155 # create a new DB object
156156 if ( $type eq ' oracle' ) {
186186 if ( $db -> setTemplate($template ) ) {
187187 print " Template $template not found. V2P process won't be created\n " ;
188188 exit (1);
189- }
189+ }
190190 }
191191
192192 if ( defined ($map_file ) ) {
193193 my $filemap_obj = new FileMap($engine_obj ,$debug );
194194 $filemap_obj -> loadMapFile($map_file );
195- $filemap_obj -> setSource($sourcename );
195+ $filemap_obj -> setSource($source );
196196 if ($filemap_obj -> validate()) {
197197 die (" Problem with mapping file. V2P process won't be created." )
198198 }
215215 $db -> setDSP($dspconnections , $dspusecompression , $dspuseencryption );
216216 $jobno = $db -> v2pSI($environment ,$envinst );
217217
218- }
218+ }
219219 elsif ($type eq ' mssql' ) {
220220
221221 if ( $db -> setFileSystemLayout($targetDirectory ,$archiveDirectory ,$dataDirectory ,$externalDirectory ,$scriptDirectory ,$tempDirectory ) ) {
222222 print " Problem with export file system layout. Is targetDiretory and dataDirectory set ?\n " ;
223223 exit (1);
224224 }
225-
225+
226226 if (defined ($norecovery )) {
227227 $db -> setNoRecovery();
228228 }
229229 $jobno = $db -> v2p($environment ,$envinst );
230- }
230+ }
231231 elsif ($type eq ' sybase' ) {
232232 if (defined ($norecovery )) {
233233 $db -> setNoRecovery();
234234 }
235235 $jobno = $db -> v2p($environment ,$envinst );
236- }
236+ }
237237
238238 $ret = $ret + Toolkit_helpers::waitForJob($engine_obj , $jobno , " V2P finished." ," Problem with V2P process" );
239-
239+
240240}
241241
242242
247247=head1 SYNOPSIS
248248
249249 dx_v2p [ -engine|d <delphix identifier> | -all ] [ -configfile file ]
250- -sourcename src_name
251- -dbname db_name
252- -environment environment_name
253- -type oracle|mssql|sybase
250+ -sourcename src_name
251+ -dbname db_name
252+ -environment environment_name
253+ -type oracle|mssql|sybase
254254 -envinst OracleHome/MSSQLinstance/SybaseInstance
255- [ -targetDirectory target_directory ]
255+ [ -targetDirectory target_directory ]
256256 [ -timestamp LATEST_SNAPSHOT|LATEST_POINT|time_stamp ]
257- [ -template template_name ]
258- [ -mapfile mapping_file ]
257+ [ -template template_name ]
258+ [ -mapfile mapping_file ]
259259 [ -norecovery ]
260260 [ -noopen ]
261- [ -instname SID ]
262- [ -uniqname db_unique_name ]
263- [ -archiveDirectory arch_directory ]
261+ [ -instname SID ]
262+ [ -uniqname db_unique_name ]
263+ [ -archiveDirectory arch_directory ]
264264 [ -dataDirectory data_dir ]
265- [ -externalDirectory external_dir ]
265+ [ -externalDirectory external_dir ]
266266 [ -tempDirectory temp_dir ]
267267 [ -dspconnections=n ]
268268 [ -dspusecompression ]
269269 [ -dspuseencryption ]
270270 [ -concurrentfiles=n ]
271- [ -help]
271+ [ -help]
272272 [ -debug]
273273
274274
@@ -373,7 +373,7 @@ =head1 OPTIONS
373373
374374=over 2
375375
376- =item B<-help >
376+ =item B<-help >
377377Print this screen
378378
379379=item B<-debug >
@@ -383,10 +383,10 @@ =head1 OPTIONS
383383
384384=head1 EXAMPLES
385385
386- Oracle V2P process
386+ Oracle V2P process
387387
388388 dx_v2p -d Landshark -sourcename testdx -dbname v2p -environment LINUXTARGET -type oracle -envinst "/u01/app/oracle/product/11.2.0/dbhome_1" -targetDirectory /data/u02/v2p
389- Starting provisioning job - JOB-231
389+ Starting provisioning job - JOB-231
390390 0 - 2 - 3 - 5 - 6 - 7 - 8 - 9 - 10 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - 43 - 44 - 46 - 47 - 49 - 50 - 51 - 52 - 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 - 92 - 93 - 94 - 95 - 96 - 97 - 98 - 99 - 100
391391 Job JOB-231 finised with state: COMPLETED
392392 V2P job finished with COMPLETED status.
@@ -408,5 +408,3 @@ =head1 EXAMPLES
408408 V2P finished..
409409
410410=cut
411-
412-
0 commit comments