keytool.exe -genkey -alias juheon -keyalg RSA -keypass 1234qwer -storepass 1234qwer -keystore juheon.jks keytool.exe -export -alias juheon -storepass 1234qwer -file juheon.cer -keystore juheon.jks keytool.exe -importkeystore -srckeystore juheon.jks -destkeystore juheon.key.p12 -deststoretype PKCS12 D:\Java\32bit\jdk1.5.0_22\jre\lib\security\cacert D:\Java\32bit\jdk1.5.0_22\bin\keytool.exe -import -alias tsasample -keystore D:\Java\32bit\jdk1.5.0_22\jre\lib\security\cacert -file D:\workspace\Servers\tsa-server-web-config\tomcat.cer keytool -import -alias somansa -keystore C:\Program Files\Java\jdk1.8.0_102\jre\lib\security\cacert -file c:\somansa.cer #인증서 생성 keytool -genkey -alias keyAlias -keyalg RSA -keypass changeit -storepass changeit –validity 9999 -keystore keystore.jks keytool -export -alias keyAlias -storepass changeit -file server.cer -keystore keystore.jks keytool -import -v -trustcacerts -alias keyAlias -file server.cer ...
DECLARE
TYPE RC
IS
REF
CURSOR;
L_CNT NUMBER;
L_NUM NUMBER;
L_NEW_USERID VARCHAR2 (20);
BEGIN
L_CNT := 0;
L_NUM := 0;
DBMS_OUTPUT.PUT_LINE ('BEGIN ' || 'EMPL');
FOR DAT IN
(
SELECT DECODE(A.JBLN_CD,'107','106','108','108',DECODE (A.SKLSTF_SE_CD, '101', '103', '102', '102','105','103','104','108','103','108')) SCLPST_CD,
A.HFFC_STTUS_CD SCLPST_STTUS_CD,
A.KOREAN_NM USER_NM_K,
A.ENGL_NM USER_NM_E,
A.CHCRT_NM USER_NM_C,
A.EMPL_NO EMPNO,
TRIM(A.IHIDNUM) IHIDNUM,
A.SEXDSTN_CD SEXDSTN,
DECODE (A.FRGNR_SE_CD, '102', 'Y', 'N') FRGNR_AT,
A.NATION_CD NLTY_CD,
A.DEPT_NO DEPT_NO,
'' GRADE_CD,
A.CLSF_CD CLSF_CD,
A.JBLN_CD JBLN_CD,
A.OFCPS_CD OFCPS_CD,
A.ZIP ZIP,
A.ADRES1 ADRES1,
A.ADRES2 ADRES2,
A.PID PID,
A.EMAIL EMAIL,
A.TELNO OWNHOM_TELNO,
A.TELNO_PREMIS OFFM_TELNO,
A.MBTLNUM MBTLNUM,
DECODE(A.JBLN_CD,'107','g_staff','108','g_staff',DECODE (A.SKLSTF_SE_CD, '101', 'g_teacher', '102', 'g_staff')) DFTGRP,
'' UNIV_GDHL_SE_CD,
'1' INOUT_SE
FROM TMP_ADM.TA_HR_HRMASTR A
)
LOOP
L_NUM := L_NUM + 1;
BEGIN
SELECT COUNT(*) INTO L_CNT
FROM TMP_CMM.TCMMUSER001
WHERE EMPNO = DAT.EMPNO;
IF L_CNT = 0 THEN
SELECT TRIM (TO_CHAR (TMP_CMM.SEQ_EMP_USER_ID.NEXTVAL)) INTO L_NEW_USERID
FROM DUAL;
INSERT INTO TMP_CMM.TCMMUSER001
(
USER_ID,
SCLPST_CD,
SCLPST_STTUS_CD,
USER_NM_K,
USER_NM_E,
USER_NM_C,
EMPNO,
IHIDNUM,
SEXDSTN,
FRGNR_AT,
NLTY_CD,
DEPT_NO,
GRADE_CD,
CLSF_CD,
JBLN_CD,
OFCPS_CD,
ZIP,
ADRES1,
ADRES2,
PID,
EMAIL,
OWNHOM_TELNO,
OFFM_TELNO,
MBTLNUM,
DFTGRP,
UNIV_GDHL_SE_CD,
INOUT_SE,
REG_DT
)
VALUES
(
L_NEW_USERID,
DAT.SCLPST_CD,
DAT.SCLPST_STTUS_CD,
DAT.USER_NM_K,
DAT.USER_NM_E,
DAT.USER_NM_C,
DAT.EMPNO,
TRIM(DAT.IHIDNUM),
DAT.SEXDSTN,
DAT.FRGNR_AT,
DAT.NLTY_CD,
DAT.DEPT_NO,
DAT.GRADE_CD,
DAT.CLSF_CD,
DAT.JBLN_CD,
DAT.OFCPS_CD,
DAT.ZIP,
DAT.ADRES1,
DAT.ADRES2,
DAT.PID,
DAT.EMAIL,
DAT.OWNHOM_TELNO,
DAT.OFFM_TELNO,
DAT.MBTLNUM,
DAT.DFTGRP,
DAT.UNIV_GDHL_SE_CD,
DAT.INOUT_SE,
TO_CHAR(SYSDATE,'YYYY-MM-DD')
);
ELSE
UPDATE TMP_CMM.TCMMUSER001
SET SCLPST_CD = DAT.SCLPST_CD,
SCLPST_STTUS_CD = DAT.SCLPST_STTUS_CD,
USER_NM_K = DAT.USER_NM_K,
USER_NM_E = DAT.USER_NM_E,
USER_NM_C = DAT.USER_NM_C,
EMPNO = DAT.EMPNO,
IHIDNUM = TRIM(DAT.IHIDNUM),
SEXDSTN = DAT.SEXDSTN,
FRGNR_AT = DAT.FRGNR_AT,
NLTY_CD = DAT.NLTY_CD,
DEPT_NO = DAT.DEPT_NO,
GRADE_CD = DAT.GRADE_CD,
CLSF_CD = DAT.CLSF_CD,
JBLN_CD = DAT.JBLN_CD,
OFCPS_CD = DAT.OFCPS_CD,
ZIP = DAT.ZIP,
ADRES1 = DAT.ADRES1,
ADRES2 = DAT.ADRES2,
PID = DAT.PID,
EMAIL = DAT.EMAIL,
OWNHOM_TELNO = DAT.OWNHOM_TELNO,
OFFM_TELNO = DAT.OFFM_TELNO,
MBTLNUM = DAT.MBTLNUM,
DFTGRP = DAT.DFTGRP,
UNIV_GDHL_SE_CD = DAT.UNIV_GDHL_SE_CD,
INOUT_SE = DAT.INOUT_SE,
UPD_DT = TO_CHAR(SYSDATE,'YYYY-MM-DD')
WHERE EMPNO = DAT.EMPNO;
END IF;
END;
END LOOP;
DBMS_OUTPUT.PUT_LINE ('EMPL_NUM:' || L_NUM);
L_NUM := 0;
DBMS_OUTPUT.PUT_LINE ('BEGIN ' || 'STUD');
FOR DAT IN
(
SELECT DECODE (A.UNIV_GDHL_SE_CD, '101', '101', '105') SCLPST_CD,
A.SKNRGS_STTUS_CD SCLPST_STTUS_CD,
A.KOREAN_NM USER_NM_K,
A.ENGL_NM USER_NM_E,
A.CHCRT_NM USER_NM_C,
A.STUDNO EMPNO,
TRIM(A.IHIDNUM) IHIDNUM,
A.SEXDSTN_CD SEXDSTN,
A.OVRSEKRN_AT FRGNR_AT,
'' NLTY_CD,
A.DEPT_NO DEPT_NO,
A.GRADE_SE_CD GRADE_CD,
A.crse_se_cd CLSF_CD,
A.UNIV_GDHL_SE_CD OFCPS_CD,
A.RESDNC_ZIP ZIP,
A.RESDNC_ADRES_1 ADRES1,
A.RESDNC_ADRES_2 ADRES2,
A.PID PID,
A.EMAIL EMAIL,
A.RESDNC_TELNO OWNHOM_TELNO,
A.RESDNC_TELNO OFFM_TELNO,
A.MBTLNUM MBTLNUM,
'g_student_co' DFTGRP,
UNIV_GDHL_SE_CD,
TMP_CMM.F_TCMM_JBLN_CD(A.STUDNO , A.DEPT_NO , A.MAJOR , A.UNIV_GDHL_SE_CD , A.CRSE_SE_CD , A.SKNRGS_STTUS_CD ) AS JBLN_CD,
'1' INOUT_SE
FROM TMP_HAK.TH_SKNRGS_M A
)
LOOP
L_NUM := L_NUM + 1;
BEGIN
SELECT COUNT(*) INTO L_CNT
FROM TMP_CMM.TCMMUSER001
WHERE EMPNO = DAT.EMPNO;
IF L_CNT = 0 THEN
SELECT TRIM (TO_CHAR (TMP_CMM.SEQ_STD_USER_ID.NEXTVAL)) INTO L_NEW_USERID
FROM DUAL;
INSERT INTO TMP_CMM.TCMMUSER001
(
USER_ID,
SCLPST_CD,
SCLPST_STTUS_CD,
USER_NM_K,
USER_NM_E,
USER_NM_C,
EMPNO,
IHIDNUM,
SEXDSTN,
FRGNR_AT,
NLTY_CD,
DEPT_NO,
GRADE_CD,
CLSF_CD,
ZIP,
ADRES1,
ADRES2,
PID,
EMAIL,
OWNHOM_TELNO,
OFFM_TELNO,
MBTLNUM,
DFTGRP,
UNIV_GDHL_SE_CD,
INOUT_SE,
UNIV_DIV_CD,
JBLN_CD,
REG_DT
)
VALUES
(
L_NEW_USERID,
DAT.SCLPST_CD,
DAT.SCLPST_STTUS_CD,
DAT.USER_NM_K,
DAT.USER_NM_E,
DAT.USER_NM_C,
DAT.EMPNO,
TRIM(DAT.IHIDNUM),
DAT.SEXDSTN,
DAT.FRGNR_AT,
DAT.NLTY_CD,
DAT.DEPT_NO,
DAT.GRADE_CD,
DAT.CLSF_CD,
DAT.ZIP,
DAT.ADRES1,
DAT.ADRES2,
DAT.PID,
DAT.EMAIL,
DAT.OWNHOM_TELNO,
DAT.OFFM_TELNO,
DAT.MBTLNUM,
DAT.DFTGRP,
DAT.UNIV_GDHL_SE_CD,
DAT.INOUT_SE,
DAT.OFCPS_CD,
DAT.JBLN_CD,
TO_CHAR(SYSDATE,'YYYY-MM-DD')
)
;
ELSE
UPDATE TMP_CMM.TCMMUSER001
SET SCLPST_CD = DAT.SCLPST_CD,
SCLPST_STTUS_CD = DAT.SCLPST_STTUS_CD,
USER_NM_K = DAT.USER_NM_K,
USER_NM_E = DAT.USER_NM_E,
USER_NM_C = DAT.USER_NM_C,
EMPNO = DAT.EMPNO,
IHIDNUM = TRIM(DAT.IHIDNUM),
SEXDSTN = DAT.SEXDSTN,
FRGNR_AT = DAT.FRGNR_AT,
NLTY_CD = DAT.NLTY_CD,
DEPT_NO = DAT.DEPT_NO,
GRADE_CD = DAT.GRADE_CD,
CLSF_CD = DAT.CLSF_CD,
ZIP = DAT.ZIP,
ADRES1 = DAT.ADRES1,
ADRES2 = DAT.ADRES2,
PID = DAT.PID,
EMAIL = DAT.EMAIL,
OWNHOM_TELNO = DAT.OWNHOM_TELNO,
OFFM_TELNO = DAT.OFFM_TELNO,
MBTLNUM = DAT.MBTLNUM,
DFTGRP = DAT.DFTGRP,
UNIV_GDHL_SE_CD = DAT.UNIV_GDHL_SE_CD,
INOUT_SE = DAT.INOUT_SE,
UNIV_DIV_CD = DAT.OFCPS_CD,
JBLN_CD = DAT.JBLN_CD,
UPD_DT = TO_CHAR(SYSDATE,'YYYY-MM-DD')
WHERE EMPNO = DAT.EMPNO;
END IF;
END;
END LOOP;
DBMS_OUTPUT.PUT_LINE ('STUD_NUM:' || L_NUM);
DBMS_OUTPUT.PUT_LINE ('END');
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE (SQLERRM);
WHEN OTHERS THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE (SQLERRM);
END;
TYPE RC
IS
REF
CURSOR;
L_CNT NUMBER;
L_NUM NUMBER;
L_NEW_USERID VARCHAR2 (20);
BEGIN
L_CNT := 0;
L_NUM := 0;
DBMS_OUTPUT.PUT_LINE ('BEGIN ' || 'EMPL');
FOR DAT IN
(
SELECT DECODE(A.JBLN_CD,'107','106','108','108',DECODE (A.SKLSTF_SE_CD, '101', '103', '102', '102','105','103','104','108','103','108')) SCLPST_CD,
A.HFFC_STTUS_CD SCLPST_STTUS_CD,
A.KOREAN_NM USER_NM_K,
A.ENGL_NM USER_NM_E,
A.CHCRT_NM USER_NM_C,
A.EMPL_NO EMPNO,
TRIM(A.IHIDNUM) IHIDNUM,
A.SEXDSTN_CD SEXDSTN,
DECODE (A.FRGNR_SE_CD, '102', 'Y', 'N') FRGNR_AT,
A.NATION_CD NLTY_CD,
A.DEPT_NO DEPT_NO,
'' GRADE_CD,
A.CLSF_CD CLSF_CD,
A.JBLN_CD JBLN_CD,
A.OFCPS_CD OFCPS_CD,
A.ZIP ZIP,
A.ADRES1 ADRES1,
A.ADRES2 ADRES2,
A.PID PID,
A.EMAIL EMAIL,
A.TELNO OWNHOM_TELNO,
A.TELNO_PREMIS OFFM_TELNO,
A.MBTLNUM MBTLNUM,
DECODE(A.JBLN_CD,'107','g_staff','108','g_staff',DECODE (A.SKLSTF_SE_CD, '101', 'g_teacher', '102', 'g_staff')) DFTGRP,
'' UNIV_GDHL_SE_CD,
'1' INOUT_SE
FROM TMP_ADM.TA_HR_HRMASTR A
)
LOOP
L_NUM := L_NUM + 1;
BEGIN
SELECT COUNT(*) INTO L_CNT
FROM TMP_CMM.TCMMUSER001
WHERE EMPNO = DAT.EMPNO;
IF L_CNT = 0 THEN
SELECT TRIM (TO_CHAR (TMP_CMM.SEQ_EMP_USER_ID.NEXTVAL)) INTO L_NEW_USERID
FROM DUAL;
INSERT INTO TMP_CMM.TCMMUSER001
(
USER_ID,
SCLPST_CD,
SCLPST_STTUS_CD,
USER_NM_K,
USER_NM_E,
USER_NM_C,
EMPNO,
IHIDNUM,
SEXDSTN,
FRGNR_AT,
NLTY_CD,
DEPT_NO,
GRADE_CD,
CLSF_CD,
JBLN_CD,
OFCPS_CD,
ZIP,
ADRES1,
ADRES2,
PID,
EMAIL,
OWNHOM_TELNO,
OFFM_TELNO,
MBTLNUM,
DFTGRP,
UNIV_GDHL_SE_CD,
INOUT_SE,
REG_DT
)
VALUES
(
L_NEW_USERID,
DAT.SCLPST_CD,
DAT.SCLPST_STTUS_CD,
DAT.USER_NM_K,
DAT.USER_NM_E,
DAT.USER_NM_C,
DAT.EMPNO,
TRIM(DAT.IHIDNUM),
DAT.SEXDSTN,
DAT.FRGNR_AT,
DAT.NLTY_CD,
DAT.DEPT_NO,
DAT.GRADE_CD,
DAT.CLSF_CD,
DAT.JBLN_CD,
DAT.OFCPS_CD,
DAT.ZIP,
DAT.ADRES1,
DAT.ADRES2,
DAT.PID,
DAT.EMAIL,
DAT.OWNHOM_TELNO,
DAT.OFFM_TELNO,
DAT.MBTLNUM,
DAT.DFTGRP,
DAT.UNIV_GDHL_SE_CD,
DAT.INOUT_SE,
TO_CHAR(SYSDATE,'YYYY-MM-DD')
);
ELSE
UPDATE TMP_CMM.TCMMUSER001
SET SCLPST_CD = DAT.SCLPST_CD,
SCLPST_STTUS_CD = DAT.SCLPST_STTUS_CD,
USER_NM_K = DAT.USER_NM_K,
USER_NM_E = DAT.USER_NM_E,
USER_NM_C = DAT.USER_NM_C,
EMPNO = DAT.EMPNO,
IHIDNUM = TRIM(DAT.IHIDNUM),
SEXDSTN = DAT.SEXDSTN,
FRGNR_AT = DAT.FRGNR_AT,
NLTY_CD = DAT.NLTY_CD,
DEPT_NO = DAT.DEPT_NO,
GRADE_CD = DAT.GRADE_CD,
CLSF_CD = DAT.CLSF_CD,
JBLN_CD = DAT.JBLN_CD,
OFCPS_CD = DAT.OFCPS_CD,
ZIP = DAT.ZIP,
ADRES1 = DAT.ADRES1,
ADRES2 = DAT.ADRES2,
PID = DAT.PID,
EMAIL = DAT.EMAIL,
OWNHOM_TELNO = DAT.OWNHOM_TELNO,
OFFM_TELNO = DAT.OFFM_TELNO,
MBTLNUM = DAT.MBTLNUM,
DFTGRP = DAT.DFTGRP,
UNIV_GDHL_SE_CD = DAT.UNIV_GDHL_SE_CD,
INOUT_SE = DAT.INOUT_SE,
UPD_DT = TO_CHAR(SYSDATE,'YYYY-MM-DD')
WHERE EMPNO = DAT.EMPNO;
END IF;
END;
END LOOP;
DBMS_OUTPUT.PUT_LINE ('EMPL_NUM:' || L_NUM);
L_NUM := 0;
DBMS_OUTPUT.PUT_LINE ('BEGIN ' || 'STUD');
FOR DAT IN
(
SELECT DECODE (A.UNIV_GDHL_SE_CD, '101', '101', '105') SCLPST_CD,
A.SKNRGS_STTUS_CD SCLPST_STTUS_CD,
A.KOREAN_NM USER_NM_K,
A.ENGL_NM USER_NM_E,
A.CHCRT_NM USER_NM_C,
A.STUDNO EMPNO,
TRIM(A.IHIDNUM) IHIDNUM,
A.SEXDSTN_CD SEXDSTN,
A.OVRSEKRN_AT FRGNR_AT,
'' NLTY_CD,
A.DEPT_NO DEPT_NO,
A.GRADE_SE_CD GRADE_CD,
A.crse_se_cd CLSF_CD,
A.UNIV_GDHL_SE_CD OFCPS_CD,
A.RESDNC_ZIP ZIP,
A.RESDNC_ADRES_1 ADRES1,
A.RESDNC_ADRES_2 ADRES2,
A.PID PID,
A.EMAIL EMAIL,
A.RESDNC_TELNO OWNHOM_TELNO,
A.RESDNC_TELNO OFFM_TELNO,
A.MBTLNUM MBTLNUM,
'g_student_co' DFTGRP,
UNIV_GDHL_SE_CD,
TMP_CMM.F_TCMM_JBLN_CD(A.STUDNO , A.DEPT_NO , A.MAJOR , A.UNIV_GDHL_SE_CD , A.CRSE_SE_CD , A.SKNRGS_STTUS_CD ) AS JBLN_CD,
'1' INOUT_SE
FROM TMP_HAK.TH_SKNRGS_M A
)
LOOP
L_NUM := L_NUM + 1;
BEGIN
SELECT COUNT(*) INTO L_CNT
FROM TMP_CMM.TCMMUSER001
WHERE EMPNO = DAT.EMPNO;
IF L_CNT = 0 THEN
SELECT TRIM (TO_CHAR (TMP_CMM.SEQ_STD_USER_ID.NEXTVAL)) INTO L_NEW_USERID
FROM DUAL;
INSERT INTO TMP_CMM.TCMMUSER001
(
USER_ID,
SCLPST_CD,
SCLPST_STTUS_CD,
USER_NM_K,
USER_NM_E,
USER_NM_C,
EMPNO,
IHIDNUM,
SEXDSTN,
FRGNR_AT,
NLTY_CD,
DEPT_NO,
GRADE_CD,
CLSF_CD,
ZIP,
ADRES1,
ADRES2,
PID,
EMAIL,
OWNHOM_TELNO,
OFFM_TELNO,
MBTLNUM,
DFTGRP,
UNIV_GDHL_SE_CD,
INOUT_SE,
UNIV_DIV_CD,
JBLN_CD,
REG_DT
)
VALUES
(
L_NEW_USERID,
DAT.SCLPST_CD,
DAT.SCLPST_STTUS_CD,
DAT.USER_NM_K,
DAT.USER_NM_E,
DAT.USER_NM_C,
DAT.EMPNO,
TRIM(DAT.IHIDNUM),
DAT.SEXDSTN,
DAT.FRGNR_AT,
DAT.NLTY_CD,
DAT.DEPT_NO,
DAT.GRADE_CD,
DAT.CLSF_CD,
DAT.ZIP,
DAT.ADRES1,
DAT.ADRES2,
DAT.PID,
DAT.EMAIL,
DAT.OWNHOM_TELNO,
DAT.OFFM_TELNO,
DAT.MBTLNUM,
DAT.DFTGRP,
DAT.UNIV_GDHL_SE_CD,
DAT.INOUT_SE,
DAT.OFCPS_CD,
DAT.JBLN_CD,
TO_CHAR(SYSDATE,'YYYY-MM-DD')
)
;
ELSE
UPDATE TMP_CMM.TCMMUSER001
SET SCLPST_CD = DAT.SCLPST_CD,
SCLPST_STTUS_CD = DAT.SCLPST_STTUS_CD,
USER_NM_K = DAT.USER_NM_K,
USER_NM_E = DAT.USER_NM_E,
USER_NM_C = DAT.USER_NM_C,
EMPNO = DAT.EMPNO,
IHIDNUM = TRIM(DAT.IHIDNUM),
SEXDSTN = DAT.SEXDSTN,
FRGNR_AT = DAT.FRGNR_AT,
NLTY_CD = DAT.NLTY_CD,
DEPT_NO = DAT.DEPT_NO,
GRADE_CD = DAT.GRADE_CD,
CLSF_CD = DAT.CLSF_CD,
ZIP = DAT.ZIP,
ADRES1 = DAT.ADRES1,
ADRES2 = DAT.ADRES2,
PID = DAT.PID,
EMAIL = DAT.EMAIL,
OWNHOM_TELNO = DAT.OWNHOM_TELNO,
OFFM_TELNO = DAT.OFFM_TELNO,
MBTLNUM = DAT.MBTLNUM,
DFTGRP = DAT.DFTGRP,
UNIV_GDHL_SE_CD = DAT.UNIV_GDHL_SE_CD,
INOUT_SE = DAT.INOUT_SE,
UNIV_DIV_CD = DAT.OFCPS_CD,
JBLN_CD = DAT.JBLN_CD,
UPD_DT = TO_CHAR(SYSDATE,'YYYY-MM-DD')
WHERE EMPNO = DAT.EMPNO;
END IF;
END;
END LOOP;
DBMS_OUTPUT.PUT_LINE ('STUD_NUM:' || L_NUM);
DBMS_OUTPUT.PUT_LINE ('END');
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE (SQLERRM);
WHEN OTHERS THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE (SQLERRM);
END;
댓글
댓글 쓰기