2 weeks ago - last edited 2 weeks ago
How to handle split audit log entries in SAP Sybase ASE?
When querying audit logs in Sybase ASE, I'm facing an issue where the extrainfo column is being split across multiple rows. This makes it difficult to analyse the complete audit information.
Query:
select * from sybsecurity..sysaudits_01
Example of the issue:
- Row 1: event, eventtime, loginname, dbname, objname, objowner, [part1 of extrainfo...]
- Row 2: event, eventtime, loginname, dbname, objname, objowner,[continuation of extrainfo...]
- Row 3: event, eventtime, loginname, dbname, objname, objowner,[rest of extrainfo...]
I need a way to either:
1. Combine these split rows into a single row per audit event(Reliably)
2. Or increase the character limit for the extrainfo column.
Request clarification before answering.
Have you tried using the sequence column in sysaudits_xx?
SELECT extrainfo FROM sysaudits_xx where eventtime =x and spid=x ORDER BY SEQUENCE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To handle split extrainfo in Sybase ASE audit logs:
1. Use auditprocess utility or sp_audit parsing scripts to reconstruct events—they handle multi-row extrainfo properly.
2. There’s no supported way to increase extrainfo column length in sysaudits_xx tables.
3. To combine rows manually, use event, eventtime, and objname as correlation keys and STRING_AGG() (if on ASE 16+) or cursor logic in a stored proc.
4. For robust analysis, export logs and process externally (e.g., Python script or shell pipeline).
5. Consider using audit init with larger audit block sizes to reduce row-splitting frequency.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To handle split extrainfo entries in Sybase ASE audit logs:
1. Use the audit_process_event function or ASE audit tools like sp_audit_read to reconstruct full events—these tools auto-merge split rows.
2. If writing custom SQL, identify related rows using event, eventtime, and spid, then use FOR XML PATH or STRING_AGG (if supported) to combine them.
3. Example (pseudocode):
SELECT eventtime, loginname,
STRING_AGG(extrainfo, '')
FROM sybsecurity..sysaudits_01
GROUP BY eventtime, loginname;
4. ASE does not support increasing the extrainfo column size—it’s fixed by Sybase.
5. Best practice: Use auditing tools or export logs and reassemble them via a script (Python/PowerShell) for complex cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
41 | |
15 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.