-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrefresh.sql
56 lines (50 loc) · 1.28 KB
/
refresh.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
-- Step 0: Clean up determinitic utilities
ALTER PACKAGE hazardutilities COMPILE PACKAGE
PLSQL_OPTIMIZE_LEVEL = 3
PLSQL_CODE_TYPE = NATIVE
PLSQL_DEBUG = FALSE;
-- Step 1: Clean up automation utilities
ALTER PACKAGE maintenanceutilities COMPILE PACKAGE
PLSQL_OPTIMIZE_LEVEL = 3
PLSQL_CODE_TYPE = NATIVE
PLSQL_DEBUG = FALSE;
-- Step 2: Refresh person surveillance sources
SET SERVEROUTPUT ON;
BEGIN
maintenanceutilities.dispatchjobs('surveillance');
EXCEPTION
WHEN OTHERS THEN
sys.dbms_output.put_line(SQLERRM);
END;
-- Step 3: Refresh person demographic sources
SET SERVEROUTPUT ON;
BEGIN
maintenanceutilities.dispatchjobs('demographics');
EXCEPTION
WHEN OTHERS THEN
sys.dbms_output.put_line(SQLERRM);
END;
-- Step 4: Refresh person fiscal census
SET SERVEROUTPUT ON;
BEGIN
maintenanceutilities.dispatchjobs('census');
EXCEPTION
WHEN OTHERS THEN
sys.dbms_output.put_line(SQLERRM);
END;
-- Step 5: Refresh person fiscal utilization
SET SERVEROUTPUT ON;
BEGIN
maintenanceutilities.dispatchjobs('utilization');
EXCEPTION
WHEN OTHERS THEN
sys.dbms_output.put_line(SQLERRM);
END;
-- Step 6: Clean up
SET SERVEROUTPUT ON;
BEGIN
maintenanceutilities.dropjobs;
EXCEPTION
WHEN OTHERS THEN
sys.dbms_output.put_line(SQLERRM);
END;