最近看到系统中一个job,可是都查不到干嘛用的,job执行的代码是:
BEGIN
/*Quest SOO PPCM job */
quest_ppcm_snapshot_pkg.take_snapshot;
END;到package bodies中quest_ppcm_snapshot_pkg,找不到对应的take_snapshot怎么回事啊?而且quest_ppcm_snapshot_pkg都看不懂,下面贴下代码:
CREATE OR REPLACE PACKAGE BODY quest_ppcm_snapshot_pkg wrapped
0
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
3
b
9200000
1
4
0
15b
2 :e:
1PACKAGE:
1BODY:
1QUEST_PPCM_SNAPSHOT_PKG:
1G_CURRENT_SNAPSHOT_ID:
1INTEGER:
1G_INSTANCE_ID:
1G_PREV_SNAPSHOT_ID:
1G_SNAPSHOT_DURATION:
1NUMBER:
1G_DB_RESTART_FLAG:
10:
1G_SNAPSHOT_TYPE:
1VARCHAR2:
110:
1SQL:
1G_START_NUMBER_DATE:
1DATE:
1TO_DATE:
130/12/1899 00::00::00:
1DD/MM/YYYY HH24::MI::SS:
1GC_PACKAGE_NAME:
1CONSTANT:
150:
1TYPE:
1NUM_TAB_TYP:
1BINARY_INTEGER:
1FUNCTION:
1JOB_INTERVAL_HRS:
1P_DBMS_JOB_INTERVAL:
1RETURN:
1V_SQLTEXT:
11000:
1V_HOURS:
1SELECT (:
1||:
1-sysdate)*24 from dual:
1EXECUTE:
1IMMEDIATE:
1STATCOM:
1Q:
1I:
1J:
1B:
1ZZ:
1Z:
1K:
11:
1WHILE:
1<=:
1LOOP:
1*:
1/:
1-:
1+:
12:
1T_PROB:
1P_T:
1P_DF:
1W:
1TH:
1STH:
1CTH:
1PI:
13.1415926:
1T:
1N:
1PROB_T:
1ABS:
1SQRT:
1ATAN:
1=:
14:
1SIN:
1COS:
1MOD:
13:
1PROB_R:
1P_N:
1P_R:
1L_T:
1L_P:
1POWER:
1DB_START_TIME:
1L_DB_START_TIME:
1STARTUP_TIME:
1V$INSTANCE:
1SELECT startup_time:n INTO l_db_start_time:n FROM v$instance:
1DBVERSION:
1DB_VERSION:
120:
1CURSOR:
1C1:
1SUBSTR:
1BANNER:
1INSTR:
1V$VERSION:
1SELECT SUBSTR (SUBSTR (banner, INSTR (banner, 'Release ') + 8),:n +
1 1,:n INSTR (SUBSTR (banner, INSTR (banner,+
1 'Release ') + 8),:n ' ':n +
1 ):n ):n FROM v$version:n WH+
1ERE banner LIKE 'Oracle%' OR banner LIKE 'Personal Oracle%':
1OPEN:
1CLOSE:
1OTHERS:
1RAISE_APPLICATION_ERROR:
120100:
1Exception in version check:
1SQLCODE:
1:::
1SQLERRM:
1GET_INSTANCE_ID:
1L_INSTANCE_ID:
1V_COUNT:
1USERENV:
1DUAL:
1SELECT USERENV ('instance'):n INTO l_instance_id:n FROM DUAL:
1COUNT:
1QUEST_PPCM_INSTANCE:
1INSTANCE_ID:
1SELECT COUNT (*):n INTO v_count:n FROM quest_ppcm_instance:n +
1 WHERE instance_id = l_instance_id:
1INSTANCE_NAME:
1HOST_NAME:
1INSERT INTO quest_ppcm_instance:n (instance_id, instance_+
1name, host_name):n SELECT l_instance_id, instance_name, host_name+
1:n FROM v$instance:
1COMMIT:
1PREV_SNAPSHOT:
1P_SNAPSHOT_ID:
1OUT:
1P_SNAPSHOT_TIMESTAMP:
1BOOLEAN:
1L_IS_PREV_SNAPSHOT:
1TRUE:
1SNAPSHOT_ID:
1SNAPSHOT_TIMESTAMP:
1QUEST_PPCM_SNAPSHOT:
1MAX:
1NVL:
1SNAPSHOT_TYPE:
1SELECT snapshot_id, snapshot_timestamp:n INTO p_snapshot_id, p_snap+
1shot_timestamp:n FROM quest_ppcm_snapshot:n WHERE snapshot+
1_id = (SELECT MAX (snapshot_id):n FROM quest_+
1ppcm_snapshot:n WHERE NVL(snapshot_type, g_sna+
1pshot_type) = g_snapshot_type):
1NO_DATA_FOUND:
1FALSE:
1SECONDS_BETWEEN:
1P_HI_DATE:
1P_LOW_DATE:
1FLOAT:
124:
160:
1NEXT_SNAPSHOT_ID:
1L_SNAPSHOT_ID:
1QUEST_PPCM_SNAPSHOT_ID_S:
1NEXTVAL:
1SELECT quest_ppcm_snapshot_id_s.NEXTVAL:n INTO l_snapshot_id:n +