I have a monitoring and not to create n procedures based on the non collections that I have, I want to call 1 procedure with everything, in n Jobs, which steps the action parameter
for example
BEGIN PROC_REP_DEV_ALL_OBJ_ALTERED('15','COLETA_HML_DESENV'); END;Run as variable DBLink drug.
Any suggestion?
Following the explanation he needs to connect to make the insert in the central TB
CREATE OR REPLACE NONEDITIONABLE PROCEDURE PROC_REP_DEV_ALL_OBJ_ALTERED(v_cod_db number, V_dblink varchar2)
as
v_recebe varchar2(200);
cursor c1 is
select * from tb_all_obj_altered@||'v_recebe'|| where trunc(tb_all_dt_captura) >= (sysdate) - 1;
begin
for a in c1
loop
INSERT INTO REP_ALL_OBJ_ALTERED
(ID,
TB_REP_ALL_DT_CAPTURA,
TB_REP_ALL_OWNER,
TB_REP_ALL_OBJ_NAME,
TB_REP_ALL_OBJ_TP,
TB_REP_ALL_LAST_DDL,
TB_REP_ALL_STATUS,
FK_TB_REPDB)
values
(SEQ_REP_BI_ALL_OBJ_ALT.nextval,
sysdate,
a.tb_all_owner,
a.tb_all_obj_name,
a.tb_all_obj_tp,
a.tb_all_last_ddl,
a.tb_all_status,
v_cod_db);
EXIT WHEN c1%NOTFOUND;
end loop;
commit;
END;

