Questions tagged [audit]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
41 views

SQL Audit Log In Repeats Results

I'm using SSMS's Audit feature to see who's successfully logging in and logging out of the server and I'm currently testing it in a server in which only I have access to it. I used for ...
1
vote
1answer
241 views

SQL server Audit- Does it cause overhead

If I enable Audit on production databases that have over 100 m rows and have constant DML statements going (24 hours), is that going to cause any overhead on SQL server performance or tempdb? Does ...
0
votes
1answer
52 views

Audit MariaDB Which User Account Privileges Are Being Used

I'm looking to improve the security of my MariaDB installation by better auditing the user accounts and the privileges of each user account. This database is being provided as a service out to many ...
2
votes
1answer
82 views

All data got deleted or truncated- What happened?

What are some of the ways of knowing how the 100 M rows of record table got wiped out. Database is in Full recovery mode. I am not sure how doing daily backups are happening but before the truncate or ...
1
vote
1answer
2k views

How to log ALL queries made by users in SQL Server 2017 Standard? [duplicate]

Is there a possibility to do this? All queries and actions performed in any database need to be logged, because of in house compliance. I need information (and/or source) if we need MS SQL 2017 ...
0
votes
1answer
62 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
1answer
182 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
1k 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
1answer
122 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
2answers
80 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
891 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
108 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
1k 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
92 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
209 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
115 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
20 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
353 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 ...
2
votes
1answer
156 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
937 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
2answers
414 views

LOG all SQL Server queries with their durations

Is there a way to log all Microsoft SQL Server queries executed on a certain server, with their respective durations? I'd like to be able to analyze all queries will a tool like what PGBADGER does ...
0
votes
1answer
476 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
57 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 ...
1
vote
1answer
4k 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
2k 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
3
votes
1answer
622 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
47 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
1k 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
221 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
102 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
78 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
822 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
699 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
699 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
288 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
148 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
1k 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
67 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
387 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 ...
1
vote
1answer
151 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
3k 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
47 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
3k 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
312 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
1answer
414 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
716 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
362 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
2k 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 ...
0
votes
1answer
38 views

After delete audit table doesn't have the rows that were deleted

CREATE TRIGGER trgEmp ON Emp AFTER DELETE AS BEGIN IF EXISTS (SELECT * FROM deleted) AND NOT EXISTS (SELECT * FROM inserted) BEGIN INSERT INTO EmpAudit ( Change, ...