1 PACKAGE XDP_PURGE AUTHID CURRENT_USER AS
2 /* $Header: XDPPRGS.pls 120.1 2005/06/16 02:26:11 appldev $ */
3
4 -- minimum number of days that SFM data will be retains.
5 -- this number will be used if users specifiy any illegal values
6 -- for number of days of data retaining in the database.
7
8 g_min_number_of_days NUMBER := 1;
9
10
11 -- Procedure PURGE
12 -- Purge obsolete data from SFM
13 --
14 -- IN:
15 -- p_number_of_days
16 -- - number of days of data will be retained in SFM.
17 -- - if not specified, g_min_number_of_days will be
18 -- - used if specified as null, or negative or less
19 -- - than g_min_number_of_days.
20 -- p_run_mode - specify run mode when this API is called.--
21 -- - 'PURGE', to purge data
22 -- - 'VERIFY', to verify setting and print out data will be purged
23 -- p_purge_data_set
24 -- - indicate what data to be purged,
25 -- - eg. '[ORDER, SOA, MSGS, MISC]' will purge order, soa
26 -- - , messages and debug/error data
27 -- - '[ORDER]' will only purge order data
28 -- - Default is null, means will not purge at all
29 --
30 -- p_purge_msg_flag
31 -- - indicate if messages whose orders still exist
32 -- - in the database should be purged or not
33 --
34 -- p_purge_order_flag
35 -- - indicate if the external messages related to orders
36 -- - will be purged
37 --
38 -- p_max_exceptions - number of continuous exceptions allowed before terminating a purge
39 --
40 -- p_log_mode - indicate if how you would like to log messages for
41 -- - purging operation. Available option TERSE and VERBOSE
42 -- -- any other words will result no message logged
43 --
44 -- p_rollback_segment - indicate what rollback segment should be used. If null, default
45 -- - rollback segment will be used
46 -- OUT:
47 -- ERRBUF - as required by concurrent manager
48 -- RETCODE - as required by concurrent manager
49 --
50 --
51 -- Note: when run by a concurrent manager, exceptions will be silenced
52 -- with proper messages returned in ERRBUF. RETCODE is 2 for
53 -- exception errors
54 --
55
56 PROCEDURE PURGE
57 (
58 ERRBUF OUT NOCOPY VARCHAR2,
59 RETCODE OUT NOCOPY VARCHAR2,
60 p_number_of_days IN NUMBER DEFAULT g_min_number_of_days,
61 p_run_mode IN VARCHAR2 DEFAULT 'VERIFY',
62 p_purge_data_set IN VARCHAR2 DEFAULT '[ORDER,SOA,MSGS,MISC]',
63 p_purge_msg_flag IN VARCHAR2 DEFAULT 'TRUE',
64 p_purge_order_flag IN VARCHAR2 DEFAULT 'TRUE',
65 p_max_exceptions IN NUMBER DEFAULT 10,
66 p_log_mode IN VARCHAR2 DEFAULT 'TERSE',
67 p_rollback_segment IN VARCHAR2 DEFAULT NULL
68 );
69
70 END XDP_PURGE;