Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Database auditing involves observing a database so as to be aware of the actions of database users.

0
votes
0answers
18 views

Retrieve all system admin users activities in SQL Server 2012

I need to log all the system admin users activities in a SQL Server 2012 server. Is there any T-Sql query I can use to retrieve this information? If not, how can I get this information quickly?
0
votes
1answer
27 views

SQL Server 2008 R2 Auditing

I am new to database administration, and I need to implement auditing of all users of multiple databases. Can we audit multiple users of a multiple database by creating just one audit specification? ...
0
votes
0answers
69 views

Is it common to store compressed byte array in SQL Server?

We are not using SQL Enterprise Edition. We have to do audit trail by ourselves. I refer the sample from https://www.codeproject.com/Articles/1019511/Audit-trail-and-data-versioning-with-Csharp-and-...
0
votes
1answer
20 views

MySQL 8.0 Triggers Current_User not working

I have this trigger that inserts a row to a table CREATE DEFINER=`root`@`localhost` TRIGGER `user_log_AFTER_INSERT` AFTER INSERT ON `user_log` FOR EACH ROW BEGIN INSERT INTO ...
2
votes
4answers
102 views

Auditing data changes in SQL Server

I am tasked with implementing auditing of data changes on our database. I am aware that there are commercial products for this, but I wanted to know which design would be better. For any given row ...
0
votes
0answers
36 views

How do I access a user's application username when that application connects to the DB?

I'd like to audit changes to a table in SQLServer using a trigger and an audit table to do so. End-users connect to the database through an application. If I use SYSTEM_USER to obtain the end user's ...
0
votes
0answers
11 views

MySQL SNMP Audit

i was looking for a way to make MySQL Enterprise Edition to send SNMP trap with audit log information. I've enabled the audit_log module and I've added some rules (for example i've decided to log ...
0
votes
2answers
33 views

Creating an auditing strategy when a user has been defined in a table instead of in SQL

To preface this post, I'm pretty new to database design, so please excuse me if there's already a simple or immediate answer to this post. In my DB I have a table called t_employees which acts as a "...
0
votes
1answer
61 views

How to trace a query on Firebird?

With SQL Server we can trace for a period of time, to get what queries are running. How can I do this with Firebird? I'm reading something on their website but there's only user trace like if the ...
1
vote
0answers
46 views

SQL Server Agent Alert does not pick up some of Events from Application Log written by SQL Server Audit

My end goal is to be emailed when new object (schema, table, procedure etc.) is created / altered / dropped at one of my databases on SQL Server I created a server-level audit, that writes to Windows ...
0
votes
3answers
102 views

How to Audit Successful Logins for certain logins only?

I need to setup auditing (logging) of successful logins on SQL Server (date, time, who), not for all logins on a server, but only for a small group of logins (developers) In short, me only ...
0
votes
2answers
74 views

Users who are connected into the database

I need some help on how to find all the users that are connected to one of my database. I should check this on weekends to find out all the users that connected during the week. Thank you.
0
votes
0answers
59 views

Good practices for audit data changes for SQL Server 2016

In my current project we are required to keep the records of data changes for the Employee table at least for specific field for NOW (it can be extended for all the fields later). We are also ...
0
votes
1answer
50 views

ORACLE 11g Know Insert Record Details which Failed to insert

I have started auditing insert records by user on failure to any table in my oracle 11g Database. I have used following command to do the same. AUDIT INSERT ANY TABLE BY SHENA BY ACCESS WHENEVER NOT ...
1
vote
0answers
15 views

Any way to pass additional parameters to Azure SQL Audit?

We are exploring Azure SQL Auditing capabilities. It gives us a list of all the queries executed and some additional data which is good. However, field server_principal_name is always reflecting a ...
1
vote
2answers
71 views

Queries not logging when using Extended Events in MS-SQL Server to track queries

I'm using MS-SQL Server 2012 Standard, running on Windows Server 2012 RTM. I used SSMS to create a Extended Event Session, where I used the built-in "Batch Query Tracking" template and save the result ...
0
votes
0answers
21 views

Generate security audits permission SECPOL - SQLSvcAccount keeps getting revoked\removed

I've followed all 3 instructions, as per: https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/write-sql-server-audit-events-to-the-security-log?view=sql-server-2017#...
2
votes
1answer
63 views

ORA-07445 when enabling Unified Auditing with Oracle Database 12.2

When enabling the below Unified Auditing policies in Oracle database 12.2, a generic error ORA-07445 in the v$alert_log and ORA-03114 for each new log-on occur: ORA-07445: exception encountered: ...
1
vote
2answers
279 views

Oracle Database Security - Audit Trail for specific user and specific module application

I want to enable audit trail for specific user, but only for sessions when this user connect to database using one specific module applications. For ex. I want to enable audit trail for user test1 ...
0
votes
0answers
31 views

Is there a way to generate a report on table/column/object usage by database user? [MSSQL]

We have a large database accessed by multiple different applications, each running under their own SQL Login, all with permission to access all objects in the database. I would (ideally) like to ...
0
votes
0answers
166 views

AWS RDS MySQL audit.log rotate

I have a problem with removing old audit.logs. Some time ago in my Option group I added a setting to store 20 logs 100MB each. I see that 20 files named audit server_audit.log.xx were created, each ...
0
votes
1answer
188 views

Polling SQL Databases [closed]

Is there any way to poll for MySQL database changes using JDBC? I need exactly which changes happened (not a simple yes/no). I tried using a thread which executes every 15 seconds to check whether my ...
0
votes
1answer
24 views

Track MySQL Procedure Changes in MySQL

We want to keep track of changes being done to MySQL procedures only, actually recently our procedures seem to have overwritten to some previous versions and we were unable to track it that who did ...
0
votes
1answer
672 views

missing FROM-clause entry for table in trigger function in postgresql

I have created an audit trigger for table "product" that should insert data into "log_product". CREATE FUNCTION public.insert_log_product() RETURNS trigger LANGUAGE 'plpgsql' COST 100 VOLATILE NOT ...
1
vote
1answer
401 views

How to grant permission to view database audit logs to non-sysadmin login

I have a non-sysadmin user which must be provided with an ability to view "server audit logs" Tried to grant below permissions to this login / user: grant ALTER ANY server AUDIT to [login] grant ...
2
votes
1answer
25 views

How to Audit any change in Permission?

Is there any way how to know "Who did change the permission on users" Like: who give read permission or owner on a database for a user? Using SQL Server 2014
2
votes
1answer
254 views

MariaDB audit plugin logs all queries instead of DML only

I was testing the "server_audit" plugin of MariaDB, which I configured like this: plugin-load-add = server_audit server_audit_logging = ON server_audit_events = QUERY_DML server_audit_output_type = ...
0
votes
2answers
37 views

audit /track changes [closed]

I want to track changes on SQL Server 2012, and save it for 5 days. I want get the time that each insert/update/delete operation occurred on the SQL Server and save the new insert line(on insert ...
0
votes
0answers
416 views

Find Who Disabled Logins in SQL Server

Someone disabled lot of SQL Server logins on one of our SQL Server 2014 boxes yesterday, causing a major outage for some of our applications. I need to find out who disabled those logins. Is there a ...
1
vote
2answers
109 views

Is there an equivalent to Azure SQL Threat Detection for on-premise database servers?

Due to GDPR, we are seeking software to help identify malicious activity or data breaches from our production SQL Server. It seems if we were using Azure, this is a flick of a switch. What is ...
2
votes
1answer
72 views

SQL Auditing Functionality

Can someone tell me what the cause of this alert is that's captured by our SQL Audit trace we have setup using the built-in auditing functionality? This alert is generated from time to time in the ...
0
votes
1answer
46 views

Get more information from Oracle audit trail

I just turned on auditing for an Oracle 11g database. I'm interested in getting more information about each event; for example, when I see a CREATE_INDEX event, I'd like to know which field was ...
1
vote
0answers
173 views

SQL Audit and Truncating the Audit File

I'd like to set up SQL Audit on our SQL 2014 database and then setup a process where we read the contents of the audit file, on a periodic basis, using fn_get_audit_file() but then immediately ...
2
votes
1answer
53 views

Logon events detail in oracle

I want to fetch the oracle user login detail for the month February. I tried the below query. select distinct os_username,username,userhost,terminal,timestamp,action_name,logoff_time from ...
12
votes
1answer
508 views

How to filter out Scalar Valued User-Defined Function usage from SQL Server Audit Data?

We have a SQL Server database which has a database audit specification which audits all execute actions on the database. CREATE DATABASE AUDIT SPECIFICATION [dbAudit] FOR SERVER AUDIT [servAudit] ADD ...
4
votes
3answers
104 views

Capturing the Login Failure alerts specifc to bad password attempts

I am unable to figure out the way to capture only those failed logins, which have failed with the error: Login failed for user X. The password did not match... Yes I can read that info out from ...
0
votes
1answer
59 views

Golden Gate activity auditing with SQL?

In a scenario where Oracle Golden Gate is used to replicate a primary site with an Oracle RAC database to a secondary site (and active/active back) we suspect unexpected changes from the unused ...
1
vote
1answer
388 views

Audit Database Log On/Off

SQL Server 2012 introduced a few new audit action groups. Two that I'm interested in using are to audit log-ons/offs at the database level: SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP ...
0
votes
1answer
49 views

Oracle - Auditing for only some top-level statements

I know that we can turn on auditing for all top-level statements using the following audit all statements I would like to continue logging only top-levels statements, but not all of them. For example,...
0
votes
1answer
237 views

Oracle Unified Auditing Update Table

I am trying to audit when a user UPDATEs a table in Oracle. The script I am running is below. All of the other auditing works fine, but not the UPDATE policies. I created two policies to try two ...
2
votes
1answer
150 views

Know what tables each user is accessing

I have a database with a lot of users, all of them with full read privileges on all the tables but not all the users are reading all the tables. I want to have each user having as little privileges as ...
3
votes
2answers
670 views

View SQL Server 2016 Login Audits

I have Login Audits for both failed and successful. How do i view the actual logs? Where are they located? https://docs.microsoft.com/en-us/sql/ssms/configure-login-auditing-sql-server-management-...
1
vote
2answers
40 views

Audit Trail trigger can't detect if dates are the same

I know this is a common problem with SQL language triggers, but I just cannot seem to get this right. Basically I'm trying to write an "Audit Trail" trigger for all of my fields. I'm using an IF ...
1
vote
1answer
1k views

Designing a bank database schema with multiple balances per account [closed]

I'm trying to build a schema to keep a record of the transactions made on some accounts, but those accounts are not "user accounts", instead there are orders that are being paid, and money is being ...
1
vote
1answer
147 views

ip address record in sybase ASE auditing database? [closed]

everone. I installed the sybsecurity database for auditing in sybase ase 15.5. The installation is OK. I configured the audit commands, for example, for auditing the sa user, and other users of the ...
0
votes
2answers
253 views

Appending a Unique “transaction id” to Audit table with Audit trigger

So I have a working audit trigger that tracks inserts, updates and deleted as well as the PK of the table and it's value. My problem is, since our apps use app accounts use an app ID, it's difficult ...
0
votes
1answer
249 views

Get Insert/Delete/Update operations with data from the transaction log

Can anyone please provide a script using fn_dblog to find Insert/Delete/Update operations with data (like Change Data Capture) that are made to the SQL Server from transaction log. I can't enable ...
1
vote
1answer
270 views

Select from sys.server_file_audits returns wrong filename

I activated an audit on a SQL Server 2016 istance. Version i SP1 CU3, Enterprise Edition. With this query: SELECT * FROM sys.server_file_audits I get as log_file_path: O:\auditfiles\ In ...
1
vote
1answer
223 views

Trigger to track changes

In SQL Server, version 2008R2 Enterprise, 64 bit, we created a database to track DDL changes. I was inspired by this solution: https://www.mssqltips.com/sqlservertip/2085/sql-server-ddl-triggers-to-...
2
votes
1answer
901 views

How to load data to a table from SQL Server Audit File?

I have enabled Auditing in SQL Server 2008 R2 to monitor DML and DDL operations. Is there any way to load SQLAudit files to the database? Or any other method to automatically load audit details ...