source: trunk/sql_init/samhain.oracle.init@ 485

Last change on this file since 485 was 481, checked in by katerina, 9 years ago

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File size: 3.1 KB
RevLine 
[1]1CREATE SEQUENCE log_log_index_seq START WITH 1;
2CREATE TABLE log (
3 log_index INTEGER NOT NULL,
4 log_ref NUMBER(20) NULL,
5 log_host VARCHAR2(64) DEFAULT 'localhost' NOT NULL,
6 log_time DATE NOT NULL,
7 log_sev VARCHAR2(4) NOT NULL,
8 log_msg VARCHAR2(4000),
9 log_hash VARCHAR2(32),
10 entry_status VARCHAR2(16) DEFAULT 'NEW' NOT NULL,
[170]11 path CLOB,
[1]12 userid VARCHAR2(8),
13 grp VARCHAR2(8),
14 program VARCHAR2(8),
15 subroutine VARCHAR2(16),
16 status VARCHAR2(12),
17 hash VARCHAR2(50),
18 path_data VARCHAR2(4000),
19 hash_data VARCHAR2(50),
20 key_uid VARCHAR2(64),
21 key_uid_data VARCHAR2(64),
22 key_id VARCHAR2(16),
23 module VARCHAR2(8),
24 return_code INTEGER,
25 syscall VARCHAR2(16),
[296]26 ip VARCHAR2(46),
[1]27 tty VARCHAR2(16),
28 peer VARCHAR2(64),
29 fromhost VARCHAR2(64),
[407]30 obj VARCHAR2(4000),
[1]31 interface VARCHAR2(64),
32 time VARCHAR2(64),
[170]33 dir CLOB,
34 linked_path CLOB,
[1]35 port INTEGER,
36 service VARCHAR2(64),
37 facility VARCHAR2(32),
38 priority VARCHAR2(32),
39 syslog_msg VARCHAR2(4000),
40 mode_old VARCHAR2(16),
41 mode_new VARCHAR2(16),
42 attr_old VARCHAR2(16),
43 attr_new VARCHAR2(16),
44 device_old VARCHAR2(16),
45 device_new VARCHAR2(16),
46 owner_old VARCHAR2(9),
47 owner_new VARCHAR2(9),
48 group_old VARCHAR2(9),
49 group_new VARCHAR2(9),
50 ctime_old VARCHAR2(25),
51 ctime_new VARCHAR2(25),
52 atime_old VARCHAR2(25),
53 atime_new VARCHAR2(25),
54 mtime_old VARCHAR2(25),
55 mtime_new VARCHAR2(25),
56 chksum_old VARCHAR2(50),
57 chksum_new VARCHAR2(50),
[170]58 link_old CLOB,
59 link_new CLOB,
[1]60 size_old NUMBER(20),
61 size_new NUMBER(20),
62 hardlinks_old NUMBER(20),
63 hardlinks_new NUMBER(20),
64 inode_old NUMBER(20),
65 inode_new NUMBER(20),
66 imode_old NUMBER(20),
67 imode_new NUMBER(20),
68 iattr_old NUMBER(20),
69 iattr_new NUMBER(20),
70 idevice_old NUMBER(20),
71 idevice_new NUMBER(20),
72 iowner_old NUMBER(20),
73 iowner_new NUMBER(20),
74 igroup_old NUMBER(20),
[68]75 igroup_new NUMBER(20),
[481]76 checkflags_old NUMBER(20),
77 checkflags_new NUMBER(20),
[68]78 acl_old VARCHAR2(4000),
79 acl_new VARCHAR2(4000)
[1]80 );
81
82CREATE UNIQUE INDEX log_log_index_key on log (log_index);
83
84CREATE INDEX ix_hash ON log (log_hash);
85
86CREATE INDEX ix_log_host ON log (log_host);
87CREATE INDEX ix_log_ref ON log (log_ref);
88CREATE INDEX ix_entry_status ON log (entry_status);
89
90GRANT INSERT ON log TO samhain;
91GRANT ALTER ON log_log_index_seq TO samhain;
92GRANT SELECT ON log_log_index_seq TO samhain;
93
94
95
Note: See TracBrowser for help on using the repository browser.