这很奇怪...
我在 sqlplus 中运行一个脚本。它似乎已经完成了它的功能,但是当我查看 .log 时,它似乎已经停止记录......还有其他人有过这种经历吗?
我想我可能在脚本运行检查进程时的某个阶段打开了日志文件,也许这是不行的?
编辑的细节是:
set serveroutput on;
set feedback off;
set echo on;
spool 4logfilethatstops.log
BEGIN
/*-----------------------------------------*/
/* Establishing AUID on dmt_identifier table*/
update DMT_CUSTOMER_ID
set auid=CUSTOMER_ID
where CUSTOMER_ID_ZONE_OFFICE = '&&var_DM_ID_ZONE_OFFICEority'
and batch_id = '&&var_batchid';
/*-----------------------------------------*/
/*Copying DM_ID to all tables*/
update dmt_ a
set DM_ID= (select CUSTOMER_ID from DMT_CUSTOMER_ID b
where b.PRI_CLT_RECORD_ID=a.PRI_CLT_RECORD_ID
and b.batch_id = '&&var_batchid'
and b.CUSTOMER_ID_ZONE_OFFICE = '&&var_DM_ID_ZONE_OFFICEority'
and b.CUSTOMER_ID_major_flag = 'Y'
and b.CUSTOMER_ID_type_code = '004')
where a.batch_id = '&&var_batchid';
[还有10个类似的陈述]
/*-----------------------------------------*/
/*Exclude records with no DM_IDs*/
update dmt_address c
set c.batch_id = c.batch_id||'-EXCLUDE'
where c.batch_id = '&&var_batchid'
and c.pri_clt_record_id in
(SELECT pri_clt_record_id FROM dmt_
where DM_ID is NULL );
[还有10个类似的陈述]
/*-----------------------------------------*/
/*Exclude merged records from dmt_ tables*/
update dmt_ c
set batch_id = batch_id||'-EXCLUDE'
where batch_id not like '%EXCLUDE%'
and c.pri_clt_record_id in
(select b.pri_clt_record_id from dmt_ a , dmt_ b
where a.container_sequence_number = b.container_sequence_number
and b.rpl_pri_clt_record_id = a.pri_clt_record_id
and a.rpl_pri_clt_record_id is null);
[还有1个类似的说法]
/*--------------------------------------------------------*/
/*Exclude dmt_insurance records from dmt_ that are not MRA*/
update dmt_insurance
set batch_id = batch_id||'-EXCLUDE'
where batch_id not like '%EXCLUDE%'
and client_insurance_record_id not like 'MRA-%';
/*-----------------------------------------------------*/
/*Populate dmt_demog with dmt_profile data*/
update dmt_staticdemographics a
set MSTATUS=(select CLIENT_ATTRIBUTE_CODE
from dmt_profile
where CLIENT_ATTRIBUTE_TYPE_CODE = 02
and batch_id = '&&var_batchid'
and PRI_CLT_RECORD_ID=a.PRI_CLT_RECORD_ID);
[另外4个类似的陈述]
/*--------------------*/
/*Populate DM_* tables*/
/*----------------*/
/*inserting person*/
insert into dm_person
(CUSTOMER_ID, DOB,DOB_EST,SEX,
CREATED_DATE,LAST_UPDATE_DATE, batch_id)
select DM_ID, DATE_OF_BIRTH,DATE_OF_BIRTH_ESTIMATION_FLAG,
SEX_CODE,MSTATUS,INDIGENOUS,RELIGION,LANGUAGE
from dmt_staticdemographics
where DM_ID is not null
and batch_id = '&&var_batchid';
[另外3个类似的陈述]
/*----------------------------------------------------------------------------------*/
-- inserting external identifiers
insert into DM_IDENTIFIER
(CUSTOMER_ID,IDENTIFIER_START_DATE,IDENTIFIER_END_DATE,IDENTIFIER_TYPE,ID_VALUE,CREATED_DATE,LAST_UPDATE_DATE, BATCH_ID, ZONE_OFFICEority)
select DM_ID,effective_start_date,effective_end_date, ext_clt_id_type_code, EXT_CLT_ID,SOURCE_CREATE_DATETIME, SOURCE_MODIFIED_DATETIME,
BATCH_ID, ext_clt_id_ZONE_OFFICE
from dmt_extidentifier
where DM_ID is not null
and batch_id = '&&var_batchid';
[另外4个类似的陈述]
COMMIT;
END;
/