The following lines contain the word 'select', 'insert', 'update' or 'delete':
UPDATE fnd_oam_dscfg_instances
SET last_imported = p_last_imported
WHERE config_instance_id = b_config_instance_info.config_instance_id;
UPDATE fnd_oam_dscfg_instances
SET import_duration = p_import_duration
WHERE config_instance_id = b_config_instance_info.config_instance_id;
UPDATE fnd_oam_dscfg_instances
SET last_compiled = p_last_compiled
WHERE config_instance_id = b_config_instance_info.config_instance_id;
UPDATE fnd_oam_dscfg_instances
SET compile_duration = p_compile_duration
WHERE config_instance_id = b_config_instance_info.config_instance_id;
SELECT config_instance_id
INTO l_config_instance_id
FROM fnd_oam_dscfg_instances
WHERE config_instance_type = p_config_instance_type
AND target_dbname = p_target_dbname
AND clone_key = p_clone_key
AND ((policyset_id IS NULL) OR (policyset_id = p_policyset_id));
INSERT INTO fnd_oam_dscfg_instances (CONFIG_INSTANCE_ID,
TARGET_DBNAME,
CONFIG_INSTANCE_TYPE,
NAME,
DESCRIPTION,
LANGUAGE,
SOURCE_DBNAME,
CLONE_KEY,
POLICYSET_ID,
CREATED_BY,
CREATION_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN)
VALUES (FND_OAM_DSCFG_INSTANCES_S.NEXTVAL,
p_target_dbname,
p_config_instance_type,
p_name,
p_description,
NVL(p_language, USERENV('LANG')),
p_source_dbname,
p_clone_key,
p_policyset_id,
FND_GLOBAL.USER_ID,
SYSDATE,
FND_GLOBAL.USER_ID,
SYSDATE,
FND_GLOBAL.USER_ID)
RETURNING CONFIG_INSTANCE_ID INTO l_config_instance_id;
SELECT target_dbname, config_instance_type, last_imported, import_duration, last_compiled, compile_duration, source_dbname, clone_key, policyset_id
INTO l_target_dbname, l_config_instance_type, l_last_imported, l_import_duration, l_last_compiled, l_compile_duration, l_source_dbname, l_clone_key, l_policyset_id
FROM fnd_oam_dscfg_instances
WHERE config_instance_id = p_config_instance_id;
FUNCTION DELETE_CONFIG_INSTANCE(p_config_instance_id IN NUMBER,
p_recurse_config IN VARCHAR2 DEFAULT NULL,
p_recurse_engine IN VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN
IS
l_ctxt VARCHAR2(60) := PKG_NAME||'DELETE_CONFIG_INSTANCE';
SELECT run_id
BULK COLLECT INTO l_run_ids
FROM fnd_oam_dscram_runs_b
WHERE config_instance_id = p_config_instance_id;
IF NOT FND_OAM_DSCRAM_UTILS_PKG.DELETE_RUN(l_run_ids(k)) THEN
l_failed := TRUE;
SELECT object_id
BULK COLLECT INTO l_object_ids
FROM fnd_oam_dscfg_objects
WHERE config_instance_id = p_config_instance_id;
IF NOT FND_OAM_DSCFG_OBJECTS_PKG.DELETE_OBJECT(l_object_ids(k),
p_recurse_config) THEN
l_failed := TRUE;
DELETE FROM fnd_oam_dscfg_instances
WHERE config_instance_id = p_config_instance_id;