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: FileSystemBackup 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:= 'FileSystemBackup'; 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(3); l_commands(1) := 'remoteOp'; l_commands(2) := 'echoParams'; l_commands(3) := 'forceMetricCollection'; 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, 1, 1, 1, null, 1, 0, 1, -1, 'FILE_SYSTEM_BACKUP', 'File System Backup', null, null, null, null) RETURNING job_type_id INTO l_job_type_id; INSERT INTO MGMT_JOB_SINGLE_TARGET_TYPES(job_type_id, single_target_type) VALUES ( l_job_type_id, 'osb_server' ); MGMT_JOB_ENGINE.insert_cluster_target_types(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, 'BRAndMetricUpdate', null, 1, 0, 0, 0, null, null, -1 ); -- PARAMINFO ENTRIES FOR STEP IsTempDataset1 -- 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) := 'command'; 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, 'IsTempDataset1', 3, '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(2); l_param_names(1) := 'username'; l_param_names(2) := 'obUserName'; 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, 'IsTempDataset1', 3, 'user', 2, null, 0, 0, 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(2); l_param_names(1) := 'password'; l_param_names(2) := 'obPassword'; 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, 'IsTempDataset1', 3, '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) := 'target_type'; l_param_names(2) := 'credential_set_name'; l_param_names(3) := 'credential_set_target_type'; 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, 'IsTempDataset1', 3, '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 := 'target_type'; l_params(1).param_type := 1; l_params(1).scalar_value := 'host'; l_params(1).vector_value := null; l_params(2) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(2).param_name := 'credential_set_name'; l_params(2).param_type := 1; l_params(2).scalar_value := 'HostCredsNormal'; l_params(2).vector_value := null; l_params(3) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(3).param_name := 'credential_set_target_type'; l_params(3).param_type := 1; l_params(3).scalar_value := 'host'; 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; -- 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(1); l_param_names(1) := 'credential_columns'; 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, 'IsTempDataset1', 3, 'inline', 5, ' ', 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(1); l_vector_vals.trim(l_vector_vals.count); l_vector_vals.extend(2); l_vector_vals(1) := 'username'; l_vector_vals(2) := 'password'; l_params(1) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(1).param_name := 'credential_columns'; l_params(1).param_type := 0; l_params(1).scalar_value := null; l_params(1).vector_value := l_vector_vals; 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=5; END; END; -- PARAM SOURCE: source type credentials 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(2); l_param_names(1) := 'username'; l_param_names(2) := 'password'; 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, 'IsTempDataset1', 3, 'credentials', 6, ' ', 0, 0, 0, l_param_names ); END; END; -- CREDENTIAL PARAM SOURCE DETAILS BEGIN DECLARE l_cred_columns MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); l_target_names MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); l_target_types MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); l_container_paths MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); l_cred_type_columns MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_cred_type_columns.trim(l_cred_type_columns.count); l_cred_type_columns.extend(2); l_cred_type_columns(1) := 'HostUserName'; l_cred_type_columns(2) := 'HostPassword'; INSERT INTO MGMT_JOB_CRED_PARAMS(source_id, credential_set_name, credential_set_target_type, base_cred_type_name, base_cred_type_target_type, base_cred_type_columns, credential_columns, credential_columns_param, target_names, target_types, container_paths, target_names_param, target_types_param, container_paths_param, set_override) SELECT source_id, '%credential_set_name%', '%credential_set_target_type%', 'HostCreds', 'host', l_cred_type_columns, null, 'credential_columns', null, null, null, 'job_target_names', 'job_target_types', null, 0 FROM MGMT_JOB_PARAM_SOURCE WHERE job_type_id= l_job_type_id AND source_index=6; 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) := 'password'; 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, 'IsTempDataset1', 3, 'user', 7, null, 0, 0, 1, l_param_names ); END; END; -- PARAM SOURCE: source type substValues 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) := 'host_command'; 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, 'IsTempDataset1', 3, 'substValues', 8, ' ', 1, 0, 0, l_param_names ); END; END; -- SUBSTVALUES PARAM SOURCE DETAILS BEGIN DECLARE l_source_params MGMT_JOB_VECTOR_PARAMS := MGMT_JOB_VECTOR_PARAMS(); BEGIN l_source_params.trim(l_source_params.count); l_source_params.extend(1); l_source_params(1) := 'command'; INSERT INTO MGMT_JOB_SUBST_PARAMS(source_id, source_params) SELECT source_id, l_source_params FROM MGMT_JOB_PARAM_SOURCE WHERE job_type_id=l_job_type_id AND source_index=8; 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(2); l_param_names(1) := 'TargetName'; l_param_names(2) := 'TargetType'; 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, 'IsTempDataset1', 3, 'inline', 9, ' ', 1, 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(2); l_params(1) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(1).param_name := 'TargetName'; l_params(1).param_type := 1; l_params(1).scalar_value := '%job_target_names%[1]'; l_params(1).vector_value := null; l_params(2) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(2).param_name := 'TargetType'; l_params(2).param_type := 1; l_params(2).scalar_value := '%job_target_types%[1]'; l_params(2).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=9; 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(2); l_param_names(1) := 'TargetUserName'; l_param_names(2) := 'TargetPassword'; 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, 'IsTempDataset1', 3, 'inline', 10, ' ', 1, 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(2); l_params(1) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(1).param_name := 'TargetUserName'; l_params(1).param_type := 1; l_params(1).scalar_value := '%username%[1]'; l_params(1).vector_value := null; l_params(2) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(2).param_name := 'TargetPassword'; l_params(2).param_type := 1; l_params(2).scalar_value := '%password%[1]'; l_params(2).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=10; 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(2); l_param_names(1) := 'obtool_job_id'; l_param_names(2) := 'obtool_job_status'; 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, 'IsTempDataset1', 3, 'inline', 11, ' ', 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(2); l_params(1) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(1).param_name := 'obtool_job_id'; l_params(1).param_type := 1; l_params(1).scalar_value := 'null'; l_params(1).vector_value := null; l_params(2) := MGMT_JOB_PARAM_RECORD(null,1,null,null); l_params(2).param_name := 'obtool_job_status'; l_params(2).param_type := 1; l_params(2).scalar_value := 'null'; l_params(2).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=11; END; END; -- ENTRIES FOR STEPSET IsTempDataset1 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, 'IsTempDataset1', 3, null, null, 1, 'main', 2, 'temp_dataset', null, null, null, null, 1, 'main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP CreateTempDataset 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, 'CreateTempDataset', 1, null, null, 3, 'IsTempDataset1', 3, null, null, 'true', null, null, 0, 'IsTempDataset1', null, 'remoteOp', 1, 0, 0, 0, 'CREATE_DATASET_STEP_NAME', 'Create Dataset', -1 ); -- STEP PARAMETERS FOR STEP CreateTempDataset 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, 'CreateTempDataset', 'remoteCommand', 1, 0, '%command%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'CreateTempDataset', 'largeInputParam', 1, 0, 'create_ds_script', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'CreateTempDataset', 'substituteLargeParam', 1, 0, 'false', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'CreateTempDataset', '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, 'CreateTempDataset', '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, 'CreateTempDataset', 'username', 1, 0, '%username%[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, 'CreateTempDataset', 'password', 1, 0, '%password%[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, 'CreateTempDataset', 'executeSynchronous', 1, 0, 'false', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'CreateTempDataset', 'outputType', 1, 0, 'command', null, null ); END; END; -- ENTRIES FOR STEP PreBackup 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, 'PreBackup', 1, null, null, 3, 'IsTempDataset1', 3, null, null, 'SWITCH_DEFAULT', null, null, 0, 'IsTempDataset1', null, 'echoParams', 1, 0, 0, 0, 'PRE_BKP_STEP_NAME', 'Pre FS Backup', -1 ); -- ENTRIES FOR STEPSET BRAndMetricUpdate 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, 'BRAndMetricUpdate', 4, null, null, 2, 'IsTempDataset1', 3, null, null, null, null, null, 1, 'main', 'Command', null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP Command 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, 'Command', 1, null, null, 4, 'BRAndMetricUpdate', 4, null, null, null, null, null, 0, 'BRAndMetricUpdate', null, 'remoteOp', 1, 0, 0, 0, 'BKP_JOB_STEP_NAME', 'FS Backup', -1 ); -- STEP PARAMETERS FOR STEP Command 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, 'Command', 'remoteCommand', 1, 0, '%host_command%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'Command', 'largeInputParam', 1, 0, 'large_os_script', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'Command', 'substituteLargeParam', 1, 0, 'false', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'Command', '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, 'Command', '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, 'Command', 'username', 1, 0, '%username%[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, 'Command', 'password', 1, 0, '%password%[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, 'Command', 'executeSynchronous', 1, 0, 'false', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'Command', 'outputType', 1, 0, 'command', null, null ); END; END; -- ENTRIES FOR STEP UpdateOperationsMetricBR 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, 'UpdateOperationsMetricBR', 1, null, null, 4, 'BRAndMetricUpdate', 4, null, null, null, null, null, 0, 'BRAndMetricUpdate', null, 'forceMetricCollection', 1, 0, 0, 0, 'UPDATE_METRIC_STEP_NAME', 'Update Target Metric', -1 ); -- STEP PARAMETERS FOR STEP UpdateOperationsMetricBR 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, 'UpdateOperationsMetricBR', '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, 'UpdateOperationsMetricBR', '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, 'UpdateOperationsMetricBR', 'metricName', 1, 0, 'Jobs', null, null ); END; END; -- ENTRIES FOR STEPSET IsTempDataset2 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, 'IsTempDataset2', 3, null, null, 2, 'BRAndMetricUpdate', 4, 'temp_dataset', null, null, null, null, 1, 'main', null, null, 1, 0, 0, 0, null, null, -1 ); -- ENTRIES FOR STEP RemoveTempDataset 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, 'RemoveTempDataset', 1, null, null, 3, 'IsTempDataset2', 3, null, null, 'true', null, null, 0, 'IsTempDataset2', null, 'remoteOp', 1, 0, 0, 0, 'REMOVE_DATASET_STEP_NAME', 'Remove Dataset', -1 ); -- STEP PARAMETERS FOR STEP RemoveTempDataset 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, 'RemoveTempDataset', 'remoteCommand', 1, 0, '%host_command%', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'RemoveTempDataset', 'largeInputParam', 1, 0, 'remove_ds_script', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'RemoveTempDataset', 'substituteLargeParam', 1, 0, 'false', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'RemoveTempDataset', '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, 'RemoveTempDataset', '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, 'RemoveTempDataset', 'username', 1, 0, '%username%[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, 'RemoveTempDataset', 'password', 1, 0, '%password%[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, 'RemoveTempDataset', 'executeSynchronous', 1, 0, 'false', null, null ); INSERT INTO MGMT_JOB_STEP_PARAMS(job_type_id, step_name, param_name, parameter_type, encrypted, scalar_value, vector_value, value_of) VALUES ( l_job_type_id, 'RemoveTempDataset', 'outputType', 1, 0, 'command', null, null ); END; END; -- ENTRIES FOR STEP PostBackup 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, 'PostBackup', 1, null, null, 3, 'IsTempDataset2', 3, null, null, 'SWITCH_DEFAULT', null, null, 0, 'IsTempDataset2', null, 'echoParams', 1, 0, 0, 0, 'POST_BKP_STEP_NAME', 'Post FS Backup', -1 ); -- ENTRIES FOR STEP UpdateOperationsMetric 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, 'UpdateOperationsMetric', 1, null, null, 2, 'IsTempDataset2', 3, null, null, null, null, null, 0, 'main', null, 'forceMetricCollection', 1, 0, 0, 0, 'UPDATE_METRIC_STEP_NAME', 'Update Target Metric', -1 ); -- STEP PARAMETERS FOR STEP UpdateOperationsMetric 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, 'UpdateOperationsMetric', '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, 'UpdateOperationsMetric', '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, 'UpdateOperationsMetric', 'metricName', 1, 0, 'Jobs', 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, 'obUserName', 0, 1, 'OSB_USER_NAME', 'OSB User Name', null, null, 3, null, null, null, 0 ); -- 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, 'dsName', 0, 1, 'DS_NAME', 'Dataset Name', 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, 'dsText', 0, 1, 'DS_SCRIPT', 'Dataset Script', null, null, 3, null, null, null, 2 ); -- 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, 'username', 0, 1, 'OS_USER_NAME', 'OS User Name', null, null, 3, null, null, null, 3 ); -- 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.ob.OBMsg', 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