Google
Web tarasdom.com

 

Sybsecurity database

See also Sybase tips page


select audit_event_name(event), loginname, objname, extrainfo 
from sybsecurity..sysaudits_01 
where datediff( dd, eventtime, getdate() ) < 1
order by eventtime
sp_help sysaudits_01
Column_name Type Length
event smallint 2
eventmod smallint 2
spid smallint 2
eventtime datetime 8
sequence smallint 2
suid int 4
dbid smallint 2
objid int 4
xactid binary 6
loginname varchar 30
dbname varchar 30
objname varchar 30
objowner varchar 30
extrainfo varchar 255
Function audit_event_name did not exist in ASE before v12.5.1. The following table could be used in this case:

create table aud_names ( 
 event int not null, 
 eventname varchar(60) not null, 
 primary key( event ) 
)
go
event eventname
1 Ad hoc Audit Record
2 Alter Database
3 Alter Table
4 BCP In
6 Bind Defalut
7 Bind Message
8 Bind Rule
9 Create Database
10 Create Table
11 Create Procedure
12 Create Trigger
13 Create Rule
14 Create Default
15 Create Message
16 Create View
17 Access to Database
18 Delete Table
19 Delete View
20 Disk Init
21 Disk Refit
22 Disk Reinit
23 Disk Mirror
24 Disk Unmirror
25 Disk Remirror
26 Drop Database
27 Drop Table
28 Drop Procedure
29 Drop Trigger
30 Drop Rule
31 Drop Default
32 Drop Message
33 Drop View
34 Dump Database
35 Dump Transaction
36 Fatal Error
37 Non Fatal Error
38 Execution of Stored Procedure
39 Execution of Trigger
40 Grant Command
41 Insert Table
42 Insert View
43 Load Database
44 Load Transaction
45 Login
46 Logout
47 Revoke Command
48 RPC In
49 RPC Out
50 Server Boot
51 Server Shutdown
52 Curread Modification
53 Curwrite Modification
54 Update Mode Modification
55 Role Toggling
58 Truncation of Audit Table
61 Access to Audit Table
62 Select Table
63 Select View
64 Truncate Table
65 Trusted Procedure execution
66 Trusted Trigger execution
67 Unbind Default
68 Unbind Rule
69 Unbind Message
70 Update Table
71 Update View
73 Auditing Enabled
74 Auditing Disabled
76 SSO Changed Password
77 Table Change
78 Audit Option Change
80 Role Check Performed
81 DBCC Command
82 Config
83 Online Database
84 Setuser Command
85 UDR Command
86 Built-in Function
87 Disk Release
88 Set SSA Command
89 Kill/Terminate Command
90 Connect Command
91 Reference
92 Command Text
93 JCS Install Command
94 JCS Remove Command
95 Unlock Admin Account
96 Quiesce Database Command
97 Create SQLJ Function
98 Drop SQLJ Function
99 SSL Administration
100 Disk Resize
101 Mount Database
102 Unmount Database
103 Login Command
104 Create Index
105 Drop Index

select eventname, objname, extrainfo
from sybsecurity..sysaudits_01 aud, sybsecurity..aud_names names
where datediff( dd, eventtime, getdate() ) < 1
and aud.event = names.event
order by eventtime

©
Page was modified 23.07.2006