REM############################################################################ REM REM Copyright (c) 2002, 2003, Oracle Corporation. All rights reserved. REM REM REM PRODUCT REM Oracle Enterprise Manager REM REM THIS FILE IS MACHINE GENERATED. DO NOT EDIT! REM REM JOB TYPE SQL FOR JOB TYPE: DBClone REM REM############################################################################# SET DEFINE OFF SET SQLPREFIX OFF BEGIN BEGIN DECLARE l_job_type_name MGMT_JOB_TYPE_INFO.job_type%TYPE; l_job_type_id MGMT_JOB_TYPE_INFO.job_type_id%TYPE; l_major_version MGMT_JOB_TYPE_INFO.major_version%TYPE; l_minor_version1 MGMT_JOB_TYPE_INFO.minor_version1%TYPE; l_minor_version2 MGMT_JOB_TYPE_INFO.minor_version2%TYPE; BEGIN l_job_type_name:= 'DBClone'; BEGIN MGMT_JOB_ENGINE.fix_flatten_steps(TRUE); MGMT_JOB_ENGINE.get_max_versions(l_job_type_name, l_major_version, l_minor_version1, l_minor_version2, l_job_type_id); l_minor_version2 := l_minor_version2+1; EXCEPTION WHEN OTHERS THEN IF SQLCODE=MGMT_GLOBAL.INVALID_JOB_TYPE_ERR THEN l_major_version := 1; l_minor_version1 := 0; l_minor_version2 := 1; ELSE RAISE; END IF; END; -- CHECK TO VALIDATE REFERENCED COMMANDS/NESTED JOB TYPES BEGIN DECLARE l_commands SMP_EMD_STRING_ARRAY := SMP_EMD_STRING_ARRAY(); l_nested_jobtypes SMP_EMD_STRING_ARRAY := SMP_EMD_STRING_ARRAY(); BEGIN l_commands.trim(l_commands.count); l_commands.extend(4); l_commands(1) := 'fileTransfer'; l_commands(2) := 'remoteOp'; l_commands(3) := 'addTarget'; l_commands(4) := 'repSQL'; MGMT_JOB_ENGINE.validate_job_type(l_job_type_name, l_commands, l_nested_jobtypes ); END; END; -- JOBTYPE ENTRY INSERT INTO MGMT_JOB_TYPE_INFO(job_type, version, major_version, minor_version1, minor_version2, job_type_category, all_target_types, agent_bound, single_target, suspend_on_nocreds, default_target_type, restartable, editable, suspendable, trusted,job_type_nlsid,job_type_default,create_text_nlsid,create_text_default,delete_text_nlsid,delete_text_default) VALUES ( l_job_type_name, '1.0', l_major_version, l_minor_version1, l_minor_version2, 0, 0, 0, 0, 0, null, 1, 0, 1, 1, null, null, null, null, null, null) RETURNING job_type_id INTO l_job_type_id; -- ENTRIES FOR STEPSET Main INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'Main', 2, null, null, -1, null, -1, null, null, null, null, null, 1, null, null, null, 1, 0, 0, 0, null, null, -1 ); -- PARAMINFO ENTRIES FOR STEP sourceCloningPreparation -- PARAM SOURCE: source type user BEGIN DECLARE l_param_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_param_names.trim(l_param_names.count); l_param_names.extend(59); l_param_names(1) := 'clonePurpose'; l_param_names(2) := 'sourceOracleHome'; l_param_names(3) := 'sourceOracleSide'; l_param_names(4) := 'sourceDBUsername'; l_param_names(5) := 'sourceUsername'; l_param_names(6) := 'spfileUsed'; l_param_names(7) := 'initMaxLogSeqNum'; l_param_names(8) := 'sourceTempDir'; l_param_names(9) := 'sourcePasswdFile'; l_param_names(10) := 'srcTempPasswdFile'; l_param_names(11) := 'destTempPasswdFile'; l_param_names(12) := 'sourceInitFile'; l_param_names(13) := 'destTempInitFile'; l_param_names(14) := 'sourceCtlFile'; l_param_names(15) := 'destTempCtlFile'; l_param_names(16) := 'srcBackupPieceNames'; l_param_names(17) := 'srcBackupArchName'; l_param_names(18) := 'srcArchNamePrefix'; l_param_names(19) := 'srcTNSAddr'; l_param_names(20) := 'destTNSAddr'; l_param_names(21) := 'stepType'; l_param_names(22) := 'retainBackupSet'; l_param_names(23) := 'useExistingBackupSet'; l_param_names(24) := 'existingArchNamePrefix'; l_param_names(25) := 'coldCloneFlag'; l_param_names(26) := 'ftpHttp'; l_param_names(27) := 'sourcePasswdFileUsage'; l_param_names(28) := 'destOracleHome'; l_param_names(29) := 'destOracleSid'; l_param_names(30) := 'destDbName'; l_param_names(31) := 'destUsername'; l_param_names(32) := 'destPasswdFile'; l_param_names(33) := 'destInitFile'; l_param_names(34) := 'destCtlFile'; l_param_names(35) := 'controlfile_max_info'; l_param_names(36) := 'datafile_num_array'; l_param_names(37) := 'datafile_name_array'; l_param_names(38) := 'adminInitFile'; l_param_names(39) := 'logfile_group_string'; l_param_names(40) := 'destTempDir'; l_param_names(41) := 'destBackupPieceNames'; l_param_names(42) := 'destBackupArchName'; l_param_names(43) := 'destArchNamePrefix'; l_param_names(44) := 'destListenerName'; l_param_names(45) := 'destListenerFile'; l_param_names(46) := 'is_standby'; l_param_names(47) := 'source_target_name'; l_param_names(48) := 'source_target_type'; l_param_names(49) := 'isAddTarget'; l_param_names(50) := 'em_target_name'; l_param_names(51) := 'em_target_type'; l_param_names(52) := 'destPort'; l_param_names(53) := 'destDBUsername'; l_param_names(54) := 'paramDelimiter'; l_param_names(55) := 'oldExternalFileArray'; l_param_names(56) := 'newExternalFileArray'; l_param_names(57) := 'NFS'; l_param_names(58) := 'v10g'; l_param_names(59) := 'compressBackupFiles'; INSERT INTO MGMT_JOB_PARAM_SOURCE(job_type_id, apply_at_submission, apply_on_retry, step_name, step_type, source_type, source_index, source_data, override_user, required, encrypted, parameter_names) VALUES ( l_job_type_id, 1, 0, 'sourceCloningPreparation', 1, 'user', 1, null, 0, 1, 0, l_param_names ); END; END; -- PARAM SOURCE: source type user BEGIN DECLARE l_param_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_param_names.trim(l_param_names.count); l_param_names.extend(5); l_param_names(1) := 'sourcePassword'; l_param_names(2) := 'destPassword'; l_param_names(3) := 'sourceDBPassword'; l_param_names(4) := 'destDBPassword'; l_param_names(5) := 'sourceDBPasswordOb'; INSERT INTO MGMT_JOB_PARAM_SOURCE(job_type_id, apply_at_submission, apply_on_retry, step_name, step_type, source_type, source_index, source_data, override_user, required, encrypted, parameter_names) VALUES ( l_job_type_id, 1, 0, 'sourceCloningPreparation', 1, 'user', 2, null, 0, 1, 1, l_param_names ); END; END; -- PARAM SOURCE: source type user BEGIN DECLARE l_param_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_param_names.trim(l_param_names.count); l_param_names.extend(1); l_param_names(1) := 'listenerOracleHome'; INSERT INTO MGMT_JOB_PARAM_SOURCE(job_type_id, apply_at_submission, apply_on_retry, step_name, step_type, source_type, source_index, source_data, override_user, required, encrypted, parameter_names) VALUES ( l_job_type_id, 0, 0, 'sourceCloningPreparation', 1, 'user', 3, null, 0, 0, 1, l_param_names ); END; END; -- PARAM SOURCE: source type inline BEGIN DECLARE l_param_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_param_names.trim(l_param_names.count); l_param_names.extend(3); l_param_names(1) := 'useDuplicate'; l_param_names(2) := 'useDuplicateOrBackup'; l_param_names(3) := 'useRMANBackup'; INSERT INTO MGMT_JOB_PARAM_SOURCE(job_type_id, apply_at_submission, apply_on_retry, step_name, step_type, source_type, source_index, source_data, override_user, required, encrypted, parameter_names) VALUES ( l_job_type_id, 0, 0, 'sourceCloningPreparation', 1, 'inline', 4, ' ', 0, 0, 0, l_param_names ); END; END; -- INLINE PARAM SOURCE DETAILS BEGIN DECLARE l_params MGMT_JOB_PARAM_LIST := MGMT_JOB_PARAM_LIST(); l_vector_vals MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_params.trim(l_params.count); l_params.extend(3); l_params(1) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(1).param_name := 'useDuplicate'; l_params(1).param_type := 1; l_params(1).scalar_value := 'N'; l_params(1).vector_value := null; l_params(2) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(2).param_name := 'useDuplicateOrBackup'; l_params(2).param_type := 1; l_params(2).scalar_value := 'N'; l_params(2).vector_value := null; l_params(3) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(3).param_name := 'useRMANBackup'; l_params(3).param_type := 1; l_params(3).scalar_value := 'N'; l_params(3).vector_value := null; INSERT INTO MGMT_JOB_VALUE_PARAMS(source_id, param_values, action) SELECT source_id, l_params, 'none' FROM MGMT_JOB_PARAM_SOURCE WHERE job_type_id=l_job_type_id AND source_index=4; END; END; -- ENTRIES FOR STEP sourceCloningPreparation INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'sourceCloningPreparation', 1, null, null, 1, 'Main', 2, null, null, null, null, null, 0, 'Main', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP sourceCloningPreparation BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'input', 1, 0, ' my $useExistingBackupSet = ''%useExistingBackupSet%''; my $useRMANBackup = ''%useRMANBackup%''; my $sourceDBUsername = ''%sourceDBUsername%''; my $sourceDBPassword = ''%sourceDBPassword%''; my $srcTNSAddr = ''%srcTNSAddr%''; my $coldCloneFlag = ''%coldCloneFlag%''; my $passwordFileUsage = ''%sourcePasswdFileUsage%''; my $sourceOracleSid = ''%sourceOracleSide%''; my $sourceInitFile = ''%sourceInitFile%''; my $sourceCtlFile = ''%sourceCtlFile%''; my $sourcePasswdFile = ''%sourcePasswdFile%''; my $srcTempPasswdFile = ''%srcTempPasswdFile%''; if(($useExistingBackupSet eq "Y") && ($useRMANBackup ne "Y")) { exit 0; } require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', $sourceOracleSid); setSrcDBCredential($sourceDBUsername, $sourceDBPassword, $srcTNSAddr); setClonePurpose($ARGV[0]); mkDir(''%sourceTempDir%''); ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'args', 1, 0, '-, %clonePurpose%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'largeInputParam', 1, 0, 'sourcePrepareInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'sourceCloningPreparation', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP createControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'createControlFile', 1, null, null, 7, 'sourceCloningPreparation', 1, null, null, null, null, null, 0, 'Main', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP createControlFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'input', 1, 0, ' if(((%useExistingBackupSet% eq "Y") && ((%is_standby% eq "N") ||((%is_standby% eq "Y") && (%useRMANBackup% eq "N")))) || (%useDuplicate% eq "Y")) { exit 0; } require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); setClonePurpose($ARGV[0]); createStandbyCtlFile(''%sourceCtlFile%''); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'args', 1, 0, '-, %clonePurpose%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP destDirCreation INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'destDirCreation', 1, null, null, 7, 'createControlFile', 1, null, null, null, null, null, 0, 'Main', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP destDirCreation BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; my $destTempDir = ''%destTempDir%''; my $destCtlFile = ''%destCtlFile%''; my $existingArchNamePrefix = ''%existingArchNamePrefix%''; my $useExistingBackupSet = ''%useExistingBackupSet%''; my $stepType = ''%stepType%''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'largeInputParam', 1, 0, 'destDirCreationInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destDirCreation', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET copyOrTransferInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyOrTransferInitPasswdFiles', 3, null, null, 7, 'destDirCreation', 1, 'stepType', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET copyOrHttpInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyOrHttpInitPasswdFiles', 2, null, null, 3, 'copyOrTransferInitPasswdFiles', 3, null, null, 'sameHost', null, null, 1, 'copyOrTransferInitPasswdFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchCopyOrHttpInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchCopyOrHttpInitPasswdFiles', 3, null, null, 1, 'copyOrHttpInitPasswdFiles', 2, 'NFS_RMAN', null, null, null, null, 1, 'copyOrHttpInitPasswdFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP copyInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 1, null, null, 3, 'switchCopyOrHttpInitPasswdFiles', 3, null, null, 'N', null, null, 0, 'switchCopyOrHttpInitPasswdFiles', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP copyInitPasswdFiles BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/db_common.pl"; copyFile(''%destTempInitFile%'', ''%destInitFile%''); if(%sourcePasswdFileUsage% eq "Y") { copyFile(''%destTempPasswdFile%'', ''%destPasswdFile%''); } else { copyFile2(''%destTempPasswdFile%'', ''%destPasswdFile%''); } exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyInitPasswdFiles', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET httpInitPasswdFilesNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpInitPasswdFilesNFS', 2, null, null, 3, 'switchCopyOrHttpInitPasswdFiles', 3, null, null, 'Y', null, null, 1, 'switchCopyOrHttpInitPasswdFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpInitFileNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpInitFileNFS', 1, null, null, 1, 'httpInitPasswdFilesNFS', 2, null, null, null, null, null, 0, 'httpInitPasswdFilesNFS', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpInitFileNFS BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'sourceFile', 1, 0, '%destTempInitFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'destFile', 1, 0, '%destInitFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFileNFS', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP httpPasswordFileNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 1, null, null, 7, 'httpInitFileNFS', 1, null, null, null, null, null, 0, 'httpInitPasswdFilesNFS', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpPasswordFileNFS BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'sourceFile', 1, 0, '%destTempPasswdFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'destFile', 1, 0, '%destPasswdFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFileNFS', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEPSET transferInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferInitPasswdFiles', 2, null, null, 3, 'copyOrTransferInitPasswdFiles', 3, null, null, 'diffHost', null, null, 1, 'copyOrTransferInitPasswdFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferInitPasswdFiles', 3, null, null, 1, 'transferInitPasswdFiles', 2, 'ftpHttp', null, null, null, null, 1, 'transferInitPasswdFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET httpInitPasswdFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpInitPasswdFiles', 2, null, null, 3, 'switchTransferInitPasswdFiles', 3, null, null, 'http', null, null, 1, 'switchTransferInitPasswdFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpInitFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpInitFile', 1, null, null, 1, 'httpInitPasswdFiles', 2, null, null, null, null, null, 0, 'httpInitPasswdFiles', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpInitFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'sourceFile', 1, 0, '%sourceInitFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'destFile', 1, 0, '%destInitFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpInitFile', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP httpPasswordFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpPasswordFile', 1, null, null, 7, 'httpInitFile', 1, null, null, null, null, null, 0, 'httpInitPasswdFiles', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpPasswordFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'sourceFile', 1, 0, '%srcTempPasswdFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'destFile', 1, 0, '%destPasswdFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpPasswordFile', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpInitPassworddFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 1, null, null, 3, 'switchTransferInitPasswdFiles', 3, null, null, 'ftp', null, null, 0, 'switchTransferInitPasswdFiles', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpInitPassworddFiles BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%sourceInitFile%''.''%paramDelimiter%''.''%srcTempPasswdFile%'' , ''%destInitFile%''.''%paramDelimiter%''.''%destPasswdFile%'', "binary".''%paramDelimiter%''."binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpInitPassworddFiles', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchCopyOrTransferControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchCopyOrTransferControlFile', 3, null, null, 7, 'copyOrTransferInitPasswdFiles', 3, 'useDuplicate', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP skipCopyOrTransferControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 1, null, null, 3, 'switchCopyOrTransferControlFile', 3, null, null, 'Y', null, null, 0, 'switchCopyOrTransferControlFile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP skipCopyOrTransferControlFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET copyOrTransferControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyOrTransferControlFile', 3, null, null, 3, 'switchCopyOrTransferControlFile', 3, 'stepType', null, 'N', null, null, 1, 'switchCopyOrTransferControlFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP copyControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyControlFile', 1, null, null, 3, 'copyOrTransferControlFile', 3, null, null, 'sameHost', null, null, 0, 'copyOrTransferControlFile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP copyControlFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/db_common.pl"; copyFile(''%destTempCtlFile%'', ''%destCtlFile%''); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET transferControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferControlFile', 2, null, null, 3, 'copyOrTransferControlFile', 3, null, null, 'diffHost', null, null, 1, 'copyOrTransferControlFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferControlFile', 3, null, null, 1, 'transferControlFile', 2, 'ftpHttp', null, null, null, null, 1, 'transferControlFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpControlFile', 1, null, null, 3, 'switchTransferControlFile', 3, null, null, 'http', null, null, 0, 'switchTransferControlFile', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpControlFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'sourceFile', 1, 0, '%sourceCtlFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'destFile', 1, 0, '%destCtlFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpControlFile', 1, null, null, 3, 'switchTransferControlFile', 3, null, null, 'ftp', null, null, 0, 'switchTransferControlFile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpControlFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%sourceCtlFile%'', ''%destCtlFile%'', "binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP destCloningPreparation INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'destCloningPreparation', 1, null, null, 7, 'switchCopyOrTransferControlFile', 3, null, null, null, null, null, 0, 'Main', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP destCloningPreparation BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'input', 1, 0, ' my $listenerOH = ''%listenerOracleHome%''; require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/clone_util.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setClonePurpose(%clonePurpose%); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); setHostCredential(''%destUsername%'', ''%destPassword%'', ''%NFS%'', ''%v10g%''); if($listenerOH ne '''') { set_env($listenerOH, ''%destOracleSid%''); } startLsnr(''%destListenerName%'', ''%destListenerFile%''); set_env(''%destOracleHome%'', ''%destOracleSid%''); my $destInitFile = ''%destInitFile%''; my $spfileUsed = ''%spfileUsed%''; my $destPasswdFile = ''%destPasswdFile%''; my $destCtlFile = ''%destCtlFile%''; my $v10g = ''%v10g%''; my $useRMANBackup = ''%useRMANBackup%''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'largeInputParam', 1, 0, 'destCloningPreparationInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'destCloningPreparation', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchUseDuplicate INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchUseDuplicate', 3, null, null, 7, 'destCloningPreparation', 1, 'useDuplicate', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP duplicateDatabase INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'duplicateDatabase', 1, null, null, 3, 'switchUseDuplicate', 3, null, null, 'Y', null, null, 0, 'switchUseDuplicate', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP duplicateDatabase BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); setClonePurpose($ARGV[0]); setColdCloneFlag($ARGV[1]); my $host = ''%job_target_names%[1]''; my $port = %destPort%; my $destOracleSid = ''%destOracleSid%''; my $destDbName = ''%destDbName%''; my $logfile_group_string = ''%logfile_group_string%''; my $spfileUsed = ''%spfileUsed%''; my $destTempDir = ''%destTempDir%''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'args', 1, 0, '-, %clonePurpose%, %coldCloneFlag%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'largeInputParam', 1, 0, 'duplicateDatabaseInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'duplicateDatabase', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchUseRMANBackup INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchUseRMANBackup', 3, null, null, 3, 'switchUseDuplicate', 3, 'useRMANBackup', null, 'N', null, null, 1, 'switchUseDuplicate', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferBackupPieces INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferBackupPieces', 3, null, null, 3, 'switchUseRMANBackup', 3, 'stepType', null, 'Y', null, null, 1, 'switchUseRMANBackup', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP skipTransferBackupPieces INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 1, null, null, 3, 'switchTransferBackupPieces', 3, null, null, 'sameHost', null, null, 0, 'switchTransferBackupPieces', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP skipTransferBackupPieces BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipTransferBackupPieces', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET transferBackupPieces INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferBackupPieces', 5, null, null, 3, 'switchTransferBackupPieces', 3, null, null, 'diffHost', 'datafile_num_array', null, 1, 'switchTransferBackupPieces', null, null, 1, 0, 0, 1, null, null, -1 ); INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferBackupPieces', 2, null, null, 5, 'transferBackupPieces', 5, null, null, 'diffHost', 'datafile_num_array', null, 1, 'transferBackupPieces', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferOneBackupPiece INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferOneBackupPiece', 3, null, null, 1, 'transferBackupPieces', 2, 'ftpHttp', null, null, null, null, 1, 'transferBackupPieces', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpOneBackupPiece INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpOneBackupPiece', 1, null, null, 3, 'switchTransferOneBackupPiece', 3, null, null, 'http', null, null, 0, 'switchTransferOneBackupPiece', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpOneBackupPiece BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'sourceFile', 1, 0, '%srcBackupPieceNames%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'destFile', 1, 0, '%destBackupPieceNames%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneBackupPiece', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpOneBackupPiece INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 1, null, null, 3, 'switchTransferOneBackupPiece', 3, null, null, 'ftp', null, null, 0, 'switchTransferOneBackupPiece', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpOneBackupPiece BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%srcBackupPieceNames%[%job_iterate_index%]'', ''%destBackupPieceNames%[%job_iterate_index%]'', "binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneBackupPiece', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET backupTransferRestoreDatafiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'backupTransferRestoreDatafiles', 5, null, null, 3, 'switchUseRMANBackup', 3, null, null, 'N', 'datafile_num_array', null, 1, 'switchUseRMANBackup', null, null, 1, 0, 0, 1, null, null, -1 ); INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'backupTransferRestoreDatafiles', 2, null, null, 5, 'backupTransferRestoreDatafiles', 5, null, null, 'N', 'datafile_num_array', null, 2, 'backupTransferRestoreDatafiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP backupOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'backupOneDatafile', 1, null, null, 1, 'backupTransferRestoreDatafiles', 2, null, null, null, null, null, 0, 'backupTransferRestoreDatafiles', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP backupOneDatafile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'input', 1, 0, ' if(%useExistingBackupSet% eq "Y") { exit 0; } require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); my $datafileBackupPiece = ''%srcBackupPieceNames%[%job_iterate_index%]''; my $datafileNumber = ''%datafile_num_array%[%job_iterate_index%]''; my $compressBackupPiece = ''%compressBackupFiles%''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'largeInputParam', 1, 0, 'backupOneDatafileInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'backupOneDatafile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET transferRestoreOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferRestoreOneDatafile', 3, null, null, 7, 'backupOneDatafile', 1, 'stepType', null, null, null, null, 1, 'backupTransferRestoreDatafiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP restoreOneDatafileSameHost INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 1, null, null, 3, 'transferRestoreOneDatafile', 3, null, null, 'sameHost', null, null, 0, 'transferRestoreOneDatafile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP restoreOneDatafileSameHost BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); my $stepType = ''%stepType%''; my $datafileBackupPiece = ''%destBackupPieceNames%[%job_iterate_index%]''; my $datafileNumber = ''%datafile_num_array%[%job_iterate_index%]''; my $datafileName = ''%datafile_name_array%[%job_iterate_index%]''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'largeInputParam', 1, 0, 'restoreOneDatafileInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafileSameHost', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET transferAndRestoreOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferAndRestoreOneDatafile', 2, null, null, 3, 'transferRestoreOneDatafile', 3, null, null, 'diffHost', null, null, 1, 'transferRestoreOneDatafile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferAndRestoreOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferAndRestoreOneDatafile', 3, null, null, 1, 'transferAndRestoreOneDatafile', 2, 'ftpHttp', null, null, null, null, 1, 'transferAndRestoreOneDatafile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpOneDatafile', 1, null, null, 3, 'switchTransferAndRestoreOneDatafile', 3, null, null, 'http', null, null, 0, 'switchTransferAndRestoreOneDatafile', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpOneDatafile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'sourceFile', 1, 0, '%srcBackupPieceNames%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'destFile', 1, 0, '%destBackupPieceNames%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneDatafile', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpOneDatafile', 1, null, null, 3, 'switchTransferAndRestoreOneDatafile', 3, null, null, 'ftp', null, null, 0, 'switchTransferAndRestoreOneDatafile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpOneDatafile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%srcBackupPieceNames%[%job_iterate_index%]'', ''%destBackupPieceNames%[%job_iterate_index%]'', "binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpOneDatafile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP restoreOneDatafile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'restoreOneDatafile', 1, null, null, 7, 'switchTransferAndRestoreOneDatafile', 3, null, null, null, null, null, 0, 'transferAndRestoreOneDatafile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP restoreOneDatafile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); my $stepType = ''%stepType%''; my $datafileBackupPiece = ''%destBackupPieceNames%[%job_iterate_index%]''; my $datafileNumber = ''%datafile_num_array%[%job_iterate_index%]''; my $datafileName = ''%datafile_name_array%[%job_iterate_index%]''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'largeInputParam', 1, 0, 'restoreOneDatafileInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreOneDatafile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET newStandbyControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'newStandbyControlFile', 3, null, null, 7, 'switchUseDuplicate', 3, 'is_standby', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP skipCreateStandbyControlFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 1, null, null, 3, 'newStandbyControlFile', 3, null, null, 'N', null, null, 0, 'newStandbyControlFile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP skipCreateStandbyControlFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCreateStandbyControlFile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET createNewFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'createNewFile', 2, null, null, 3, 'newStandbyControlFile', 3, null, null, 'Y', null, null, 1, 'newStandbyControlFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP createControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'createControlFile2', 1, null, null, 1, 'createNewFile', 2, null, null, null, null, null, 0, 'createNewFile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP createControlFile2 BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'input', 1, 0, ' if(((%useExistingBackupSet% eq "Y") && (%useRMANBackup% eq "N")) || (%useDuplicate% eq "Y")) { exit 0; } require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); setClonePurpose($ARGV[0]); unlink(''%sourceCtlFile%''); createStandbyCtlFile(''%sourceCtlFile%''); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'args', 1, 0, '-, %clonePurpose%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createControlFile2', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchCopyOrTransferControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchCopyOrTransferControlFile2', 3, null, null, 7, 'createControlFile2', 1, 'useDuplicate', null, null, null, null, 1, 'createNewFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP skipCopyOrTransferControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 1, null, null, 3, 'switchCopyOrTransferControlFile2', 3, null, null, 'Y', null, null, 0, 'switchCopyOrTransferControlFile2', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP skipCopyOrTransferControlFile2 BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipCopyOrTransferControlFile2', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET copyOrTransferControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyOrTransferControlFile2', 3, null, null, 3, 'switchCopyOrTransferControlFile2', 3, 'stepType', null, 'N', null, null, 1, 'switchCopyOrTransferControlFile2', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP copyControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'copyControlFile2', 1, null, null, 3, 'copyOrTransferControlFile2', 3, null, null, 'sameHost', null, null, 0, 'copyOrTransferControlFile2', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP copyControlFile2 BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/db_common.pl"; if(%useDuplicate% eq "Y") { exit 0; } copyFile(''%destTempCtlFile%'', ''%destCtlFile%tmp''); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'copyControlFile2', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET transferControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferControlFile2', 2, null, null, 3, 'copyOrTransferControlFile2', 3, null, null, 'diffHost', null, null, 1, 'copyOrTransferControlFile2', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferControlFile2', 3, null, null, 1, 'transferControlFile2', 2, 'ftpHttp', null, null, null, null, 1, 'transferControlFile2', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpControlFile2', 1, null, null, 3, 'switchTransferControlFile2', 3, null, null, 'http', null, null, 0, 'switchTransferControlFile2', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpControlFile2 BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'sourceFile', 1, 0, '%sourceCtlFile%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'destFile', 1, 0, '%destCtlFile%tmp', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpControlFile2', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpControlFile2 INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpControlFile2', 1, null, null, 3, 'switchTransferControlFile2', 3, null, null, 'ftp', null, null, 0, 'switchTransferControlFile2', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpControlFile2 BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%sourceCtlFile%'', ''%destCtlFile%tmp'', "binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpControlFile2', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchColdHotClone INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchColdHotClone', 3, null, null, 7, 'newStandbyControlFile', 3, 'coldCloneFlag', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP openSourceDatabaseAfterClodClone INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 1, null, null, 3, 'switchColdHotClone', 3, null, null, 'Y', null, null, 0, 'switchColdHotClone', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP openSourceDatabaseAfterClodClone BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'input', 1, 0, ' if(%useExistingBackupSet% eq "Y") { exit 0; } require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); openDBAfterColdClone(); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'openSourceDatabaseAfterClodClone', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET hotCloneStepSet INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'hotCloneStepSet', 2, null, null, 3, 'switchColdHotClone', 3, null, null, 'N', null, null, 1, 'switchColdHotClone', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchHotCloneDuplicate INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchHotCloneDuplicate', 3, null, null, 1, 'hotCloneStepSet', 2, 'useDuplicateOrBackup', null, null, null, null, 1, 'hotCloneStepSet', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP skipSwitchHotCloneStepSet INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 1, null, null, 3, 'switchHotCloneDuplicate', 3, null, null, 'Y', null, null, 0, 'switchHotCloneDuplicate', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP skipSwitchHotCloneStepSet BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'skipSwitchHotCloneStepSet', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchHotCloneStepSet INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchHotCloneStepSet', 3, null, null, 3, 'switchHotCloneDuplicate', 3, 'stepType', null, 'N', null, null, 1, 'switchHotCloneDuplicate', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET archiveCurrentLogsSameHostSet INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostSet', 2, null, null, 3, 'switchHotCloneStepSet', 3, null, null, 'sameHost', null, null, 1, 'switchHotCloneStepSet', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchArchiveCurrentLogsSameHost INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchArchiveCurrentLogsSameHost', 3, null, null, 1, 'archiveCurrentLogsSameHostSet', 2, 'useExistingBackupSet', null, null, null, null, 1, 'archiveCurrentLogsSameHostSet', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP archiveCurrentLogsSameHostNewBackup INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 1, null, null, 3, 'switchArchiveCurrentLogsSameHost', 3, null, null, 'N', null, null, 0, 'switchArchiveCurrentLogsSameHost', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP archiveCurrentLogsSameHostNewBackup BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); setClonePurpose(%clonePurpose%); backupLog(''%srcBackupArchName%'', ''%initMaxLogSeqNum%''); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostNewBackup', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP archiveCurrentLogsSameHostExistingBackup INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 1, null, null, 3, 'switchArchiveCurrentLogsSameHost', 3, null, null, 'Y', null, null, 0, 'switchArchiveCurrentLogsSameHost', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP archiveCurrentLogsSameHostExistingBackup BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogsSameHostExistingBackup', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP restoreCurrentLogsSameHostExistingBackup INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 1, null, null, 7, 'switchArchiveCurrentLogsSameHost', 3, null, null, null, null, null, 0, 'archiveCurrentLogsSameHostSet', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP restoreCurrentLogsSameHostExistingBackup BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); if(''%existingArchNamePrefix%'' eq "REC_AREA") { restoreLogSameHostExistingBS(''%destBackupArchName%'', ''''); } else{ restoreLogSameHostExistingBS(''%destBackupArchName%'', ''%existingArchNamePrefix%''); } exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogsSameHostExistingBackup', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET backupTransferRestoreCurrentLogs INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'backupTransferRestoreCurrentLogs', 2, null, null, 3, 'switchHotCloneStepSet', 3, null, null, 'diffHost', null, null, 1, 'switchHotCloneStepSet', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP archiveCurrentLogs INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'archiveCurrentLogs', 1, null, null, 1, 'backupTransferRestoreCurrentLogs', 2, null, null, null, null, null, 0, 'backupTransferRestoreCurrentLogs', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP archiveCurrentLogs BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'input', 1, 0, ' if(%useExistingBackupSet% eq "Y") { exit 0; } require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%sourceOracleHome%'', ''%sourceOracleSide%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); setClonePurpose(%clonePurpose%); backupLog(''%srcBackupArchName%'', ''%initMaxLogSeqNum%''); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'archiveCurrentLogs', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchTransferCurrentLogs INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferCurrentLogs', 3, null, null, 7, 'archiveCurrentLogs', 1, 'ftpHttp', null, null, null, null, 1, 'backupTransferRestoreCurrentLogs', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpCurrentLogs INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpCurrentLogs', 1, null, null, 3, 'switchTransferCurrentLogs', 3, null, null, 'http', null, null, 0, 'switchTransferCurrentLogs', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpCurrentLogs BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'sourceFile', 1, 0, '%srcBackupArchName%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'destFile', 1, 0, '%destBackupArchName%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpCurrentLogs', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpCurrentLogs INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpCurrentLogs', 1, null, null, 3, 'switchTransferCurrentLogs', 3, null, null, 'ftp', null, null, 0, 'switchTransferCurrentLogs', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpCurrentLogs BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%srcBackupArchName%'', ''%destBackupArchName%'', "binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpCurrentLogs', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP restoreCurrentLogs INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'restoreCurrentLogs', 1, null, null, 7, 'switchTransferCurrentLogs', 3, null, null, null, null, null, 0, 'backupTransferRestoreCurrentLogs', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP restoreCurrentLogs BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); if(''%destArchNamePrefix%'' eq "REC_AREA") { restoreLog(''%destBackupArchName%'', ''''); } else{ restoreLog(''%destBackupArchName%'', ''%destArchNamePrefix%''); } exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'restoreCurrentLogs', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP recoverDatabase INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'recoverDatabase', 1, null, null, 7, 'switchColdHotClone', 3, null, null, null, null, null, 0, 'Main', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP recoverDatabase BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; my $destOracleHome = ''%destOracleHome%''; my $destOracleSid = ''%destOracleSid%''; my $destListenerFile = ''%destListenerFile%''; my $existingArchNamePrefix = ''%existingArchNamePrefix%''; setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); setClonePurpose($ARGV[0]); setColdCloneFlag($ARGV[1]); my $archPrefix = ''%destArchNamePrefix%''; if($ARGV[2] eq "sameHost") { $archPrefix = $existingArchNamePrefix; } my $destDbName = ''%destDbName%''; my $logfile_group_string = ''%logfile_group_string%''; my $controlfile_max_info = ''%controlfile_max_info%''; my $destInitFile = ''%destInitFile%''; my $spfileUsed = ''%spfileUsed%''; my $destTempDir = ''%destTempDir%''; my $host = ''%job_target_names%[1]''; my $port = %destPort%; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'args', 1, 0, '-, %clonePurpose%, %coldCloneFlag%, %stepType%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'largeInputParam', 1, 0, 'recoverDatabaseInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'recoverDatabase', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET postCloning INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'postCloning', 3, null, null, 7, 'recoverDatabase', 1, 'is_standby', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET postCloningForClone INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'postCloningForClone', 2, null, null, 3, 'postCloning', 3, null, null, 'N', null, null, 1, 'postCloning', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP addTempFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'addTempFiles', 1, null, null, 1, 'postCloningForClone', 2, null, null, null, null, null, 0, 'postCloningForClone', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP addTempFiles BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); setClonePurpose(%clonePurpose%); if(%isAddTarget% eq "Y") { setDBSNMPpassword(''%destDBPassword%''); } my $stepType = %stepType%; my $destTempDir = ''%destTempDir%''; my $useExistingBackupSet = %useExistingBackupSet%; my $existingArchNamePrefix = ''%existingArchNamePrefix%''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'largeInputParam', 1, 0, 'addTempFilesInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addTempFiles', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP postCloningScript INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'postCloningScript', 1, null, null, 2, 'addTempFiles', 1, null, null, null, null, null, 0, 'postCloningForClone', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP postCloningScript BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); setClonePurpose(%clonePurpose%); ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'largeInputParam', 1, 0, 'postCloningScriptInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningScript', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP postCloningMask INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'postCloningMask', 1, null, null, 2, 'postCloningScript', 1, null, null, null, null, null, 0, 'postCloningForClone', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP postCloningMask BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); setClonePurpose(%clonePurpose%); ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'largeInputParam', 1, 0, 'postCloningMaskInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'postCloningMask', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP createStandby INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'createStandby', 1, null, null, 3, 'postCloning', 3, null, null, 'Y', null, null, 0, 'postCloning', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP createStandby BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; DGsetPrmyCreds(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%srcTNSAddr%''); set_env(''%destOracleHome%'', ''%destOracleSid%''); setSrcDBCredential(''%sourceDBUsername%'', ''%sourceDBPassword%''); DGsetStbyCredsNoConn(''%sourceDBUsername%'', ''%sourceDBPassword%'', ''%destTNSAddr%''); $DGParam1 = ''%sourceDBPasswordOb%''; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'args', 1, 0, '-', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'largeInputParam', 1, 0, 'createStandbyInput', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'createStandby', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET transferExternalFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferExternalFiles', 5, null, null, 7, 'postCloning', 3, null, null, null, 'oldExternalFileArray', null, 1, 'Main', null, null, 1, 0, 0, 1, null, null, -1 ); INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferExternalFiles', 2, null, null, 5, 'transferExternalFiles', 5, null, null, null, 'oldExternalFileArray', null, 1, 'transferExternalFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferExternalFiles INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferExternalFiles', 3, null, null, 1, 'transferExternalFiles', 2, 'stepType', null, null, null, null, 1, 'transferExternalFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET TransferExternalFilesNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'TransferExternalFilesNFS', 2, null, null, 3, 'switchTransferExternalFiles', 3, null, null, 'sameHost', null, null, 1, 'switchTransferExternalFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferExternalFilesNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferExternalFilesNFS', 3, null, null, 1, 'TransferExternalFilesNFS', 2, 'NFS', null, null, null, null, 1, 'TransferExternalFilesNFS', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET httpExternalFileNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpExternalFileNFS', 2, null, null, 3, 'switchTransferExternalFilesNFS', 3, null, null, 'Y', null, null, 1, 'switchTransferExternalFilesNFS', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpOneExternalFileNFS INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 1, null, null, 1, 'httpExternalFileNFS', 2, null, null, null, null, null, 0, 'httpExternalFileNFS', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpOneExternalFileNFS BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'sourceFile', 1, 0, '%oldExternalFileArray%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'destFile', 1, 0, '%newExternalFileArray%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFileNFS', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEPSET transferOneExternalFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'transferOneExternalFile', 2, null, null, 3, 'switchTransferExternalFiles', 3, null, null, 'diffHost', null, null, 1, 'switchTransferExternalFiles', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET switchTransferExternalFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchTransferExternalFile', 3, null, null, 1, 'transferOneExternalFile', 2, 'ftpHttp', null, null, null, null, 1, 'transferOneExternalFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEPSET httpExternalFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpExternalFile', 2, null, null, 3, 'switchTransferExternalFile', 3, null, null, 'http', null, null, 1, 'switchTransferExternalFile', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP httpOneExternalFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'httpOneExternalFile', 1, null, null, 1, 'httpExternalFile', 2, null, null, null, null, null, 0, 'httpExternalFile', null, 'fileTransfer', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP httpOneExternalFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'sourceTargetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'sourceTargetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'destTargetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'destTargetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'sourceFile', 1, 0, '%oldExternalFileArray%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'destFile', 1, 0, '%newExternalFileArray%[%job_iterate_index%]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'sourceUsername', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'sourcePassword', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'destUsername', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'httpOneExternalFile', 'destPassword', 1, 0, '%destPassword%', null, null ); END; END; -- ENTRIES FOR STEP ftpExternalFile INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'ftpExternalFile', 1, null, null, 3, 'switchTransferExternalFile', 3, null, null, 'ftp', null, null, 0, 'switchTransferExternalFile', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP ftpExternalFile BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'input', 1, 0, ' require "$ENV{EMDROOT}/sysman/admin/scripts/db/dbclone/db_clone.pl"; ftpGet(''%job_target_names%[2]'', ''%sourceUsername%'', ''%sourcePassword%'', ''%oldExternalFileArray%[%job_iterate_index%]'', ''%newExternalFileArray%[%job_iterate_index%]'', "binary"); exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'ftpExternalFile', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET switchAddEMTarget INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'switchAddEMTarget', 3, null, null, 7, 'transferExternalFiles', 5, 'isAddTarget', null, null, null, null, 1, 'Main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP notAddEMTarget INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'notAddEMTarget', 1, null, null, 3, 'switchAddEMTarget', 3, null, null, 'N', null, null, 0, 'switchAddEMTarget', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP notAddEMTarget BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'input', 1, 0, ' exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'targetName', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'targetType', 1, 0, '%job_target_types%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'username', 1, 0, '%destUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'password', 1, 0, '%destPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'notAddEMTarget', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEPSET addEMTarget INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'addEMTarget', 2, null, null, 3, 'switchAddEMTarget', 3, null, null, 'Y', null, null, 1, 'switchAddEMTarget', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP addEMTargetToRepository INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'addEMTargetToRepository', 1, null, null, 1, 'addEMTarget', 2, null, null, null, null, null, 0, 'addEMTarget', null, 'repSQL', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP addEMTargetToRepository BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sql', 1, 0, ' begin declare properties MGMT_TARGET_PROPERTY_LIST; monitoring_creds SMP_EMD_NVPAIR_ARRAY; l_meta_ver varchar2(8); begin properties := MGMT_TARGET_PROPERTY_LIST(); properties.extend(4); properties(1) := MGMT_TARGET_PROPERTY(''MachineName'', ''INSTANCE'',?); properties(2) := MGMT_TARGET_PROPERTY(''Port'', ''INSTANCE'', ?); properties(3) := MGMT_TARGET_PROPERTY(''SID'', ''INSTANCE'', ?); properties(4) := MGMT_TARGET_PROPERTY(''OracleHome'', ''INSTANCE'',?); monitoring_creds := SMP_EMD_NVPAIR_ARRAY(); monitoring_creds.extend(2); monitoring_creds(1) := SMP_EMD_NVPAIR(''UserName'', ?); monitoring_creds(2) := SMP_EMD_NVPAIR(''password'', ?); select MAX(target_type_meta_ver) into l_meta_ver from mgmt_credential_sets where target_type=''oracle_database'' and set_name=''DBCredsMonitoring''; mgmt_target.add_target(?, ?, ?, properties, null, null, monitoring_creds, null, null,TO_CHAR(SYSTIMESTAMP,''TZR''),MGMT_GLOBAL.G_MON_MODE_DEFAULT, l_meta_ver); end; end; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam1', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam2', 1, 0, '%destPort%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam3', 1, 0, '%destOracleSid%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam4', 1, 0, '%destOracleHome%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam5', 1, 0, '%destDBUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam6', 1, 0, '%destDBPassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam7', 1, 0, '%em_target_name%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam8', 1, 0, '%em_target_type%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'sqlinparam9', 1, 0, '%job_target_names%[1]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToRepository', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP addEMTargetToEMD INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'addEMTargetToEMD', 1, null, null, 7, 'addEMTargetToRepository', 1, null, null, null, null, null, 0, 'addEMTarget', null, 'addTarget', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP addEMTargetToEMD BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToEMD', 'targetName', 1, 0, '%em_target_name%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToEMD', 'targetType', 1, 0, '%em_target_type%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'addEMTargetToEMD', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- ENTRIES FOR STEP cleanupSourceTempDir INSERT INTO mgmt_job_execplan(job_type_id, step_name, step_type, nested_job_type, nested_job_target_type, incoming_edge_type, origin_step_name, origin_step_type, switch_var_name, switch_var_index, switch_case_val, iterate_param, iterate_param_filter, num_children, stepset_name, stepset_status, command_name, restart_mode, all_params, all_targets, halt_on_failure,step_nlsid ,step_default,trusted) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 1, null, null, 7, 'switchAddEMTarget', 3, null, null, null, null, null, 0, 'Main', null, 'remoteOp', 1, 0, 0, 0, null, null, -1 ); -- STEP PARAMETERS FOR STEP cleanupSourceTempDir BEGIN DECLARE l_vector_values MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'remoteCommand', 1, 0, '%perlbin%/perl', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'input', 1, 0, ' if((%useExistingBackupSet% eq "Y") && (%useRMANBackup% ne "Y")) { exit 0; } if(%retainBackupSet% ne "Y") { require "$ENV{EMDROOT}/sysman/admin/scripts/db/db_common.pl"; removeDir(''%sourceTempDir%''); } exit 0; ', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'targetName', 1, 0, '%job_target_names%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'targetType', 1, 0, '%job_target_types%[2]', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'username', 1, 0, '%sourceUsername%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'password', 1, 0, '%sourcePassword%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'cleanupSourceTempDir', 'executeSynchronous', 1, 0, 'false', null, null ); END; END; -- SECURITY INFO ENTRIES BEGIN DECLARE l_target_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); l_target_types MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_target_names.trim(l_target_names.count); l_target_names.extend(1); l_target_names(1) := '%job_target_names%[2]'; l_target_types.trim(l_target_types.count); l_target_types.extend(1); l_target_types(1) := '%job_target_types%[2]'; INSERT INTO MGMT_JOB_SEC_INFO(job_type_id, apply_at_submission, privilege_name, privilege_type, target_names, target_types, target_names_param, target_types_param) VALUES ( l_job_type_id, 1, 'VIEW_TARGET', 1, l_target_names, l_target_types, null, null ); END; END; BEGIN DECLARE l_target_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); l_target_types MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_target_names.trim(l_target_names.count); l_target_names.extend(1); l_target_names(1) := '%job_target_names%[1]'; l_target_types.trim(l_target_types.count); l_target_types.extend(1); l_target_types(1) := '%job_target_types%[1]'; INSERT INTO MGMT_JOB_SEC_INFO(job_type_id, apply_at_submission, privilege_name, privilege_type, target_names, target_types, target_names_param, target_types_param) VALUES ( l_job_type_id, 1, 'MAINTAIN_TARGET', 1, l_target_names, l_target_types, null, null ); END; END; -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'sourceOracleHome', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destOracleHome', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'sourceOracleSide', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destOracleSid', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destDbName', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'sourceUsername', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destUsername', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'sourceTempDir', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destTempDir', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'compressBackupFiles', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'sourcePasswdFileUsage', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destListenerName', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'destListenerFile', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'spfileUsed', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'retainBackupSet', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'useDuplicate', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'useExistingBackupSet', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'useRMANBackup', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- PARAMETERDISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_PARAM_DSPLY_INFO (job_type_id , parameter_name ,show_in_create , show_in_results ,label_nlsid , label_default , hint_nlsid , hint_default , display_mode , num_lines , default_text , default_nlsid , param_order) VALUES ( l_job_type_id, 'em_target_name', 0, 1, null, null, null, null, 3, null, null, null, -1 ); -- DISPLAYINFO ENTRIES INSERT INTO MGMT_JOB_TYPE_DISPLAY_INFO(job_type_id, nls_bundle,use_default_create_ui) VALUES ( l_job_type_id, 'oracle.sysman.db.rsc.DBCloneJobMsg', 0 ); -- Ensure that all existing scheduled executions use the new jobtype version MGMT_JOB_ENGINE.reschedule_on_new_jobtype_ver(l_job_type_id); -- Patch NLS information for backward-compatibility MGMT_JOB_ENGINE.update_job_type_nls_info(l_job_type_id, l_job_type_name); END; END; MGMT_JOB_ENGINE.fix_flatten_steps(FALSE); EXCEPTION WHEN OTHERS THEN MGMT_JOB_ENGINE.fix_flatten_steps(FALSE); RAISE; END; / COMMIT; SET DEFINE ON SET SQLPREFIX ON