We’re rewarding the question askers & reputations are being recalculated! Read more.

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
29
votes
4answers
93k views

How to find out who deleted some data SQL Server

My boss had a query from a customer yesterday asking how they could find out who deleted some data in their SQL Server database (it is the express edition if that matters). I thought this could be ...
11
votes
4answers
23k views

Audit logins on MySQL database

Is there a way to audit logins to MySQL? I'd like to be able to create a username for each employee and thereby create an audit trail of logins. However, googling has turned up no good results. The ...
3
votes
2answers
5k views

Sql Server - How to convert Audit log into a table?

I am using Sql Server 2014, Standard Edition. My objective is to trace the history of operations on the tables (insert, update, delete), and to display on the web so the users are able to tell what ...
15
votes
2answers
38k views

Best way to design a database and table to keep records of changes?

I need to setup a history feature on a project to keep track of prior changes. Let's say I have two tables right now: NOTES TABLE (id, userid, submissionid, message) SUBMISSIONS TABLE (id, name, ...
5
votes
7answers
599 views

Policies RE database triggers in well-designed applications?

I've heard all kinds of horror stories around gremlins living in database triggers, and--worse--systems being brought down by the addition of a trigger that caused a chain of cascading ones. I'm ...
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 ...
6
votes
1answer
6k views

SQL Server Audit Specification - filter DML by all but one user

I'm setting up a database audit. I'd like to capture any DML change that is issued by database user other than the service account related to the application. In short, this is to prove to our ...
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 ...
24
votes
4answers
42k views

What is an audit table?

What are audit tables? How are they useful? I came across them reading this article.
10
votes
1answer
56k views

how to get History of queries executed with username in SQL

I can get executed queries by using: SELECT deqs.last_execution_time AS [Time] ,dest.TEXT AS [Query] FROM sys.dm_exec_query_stats AS deqs CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest ...
2
votes
3answers
4k views

What are the best practices for triggers to maintain a revision number on records?

I have an audit trail implemented on an application database that captures old value, new value, modification time, and user inserting it into another table. I'm now wanting to add a revision number ...
6
votes
2answers
4k views

Track grant permission on tables

I'd like to see if there are any changes on the permissions granted for a specific table. For example, I don't want to have the login 'John' have the SELECT permission on the table Invoices. If ...
4
votes
1answer
4k views

Is Service Broker the best choice for auditing data changes on SQL Server Express?

My project is to audit 5 to 10 existing tables in our system without prolonging transactions. Whatever method is used, it has to work on SQL Server Express 2005 to (eventually) 2016. I've done ...
3
votes
2answers
19k views

Trigger to audit table changes

I have created a trigger to audit changes to a table: CREATE TRIGGER [dbo].[iudt_AutoAuditChanges] ON dbo.CPTCategoryMaster AFTER INSERT,DELETE,UPDATE AS BEGIN SET NOCOUNT ON; ...
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 ...
2
votes
2answers
19k views

Oracle SYS Auditing with Audit Trail to DB

I have an Oracle Database 11g R2 on Oracle Enterprise Linux. I have enabled SYS auditing as: SQL> ALTER SYSTEM SET audit_sys_operations=true SCOPE=spfile; SQL> ALTER SYSTEM SET audit_trail=OS ...
2
votes
1answer
82 views

Auditing/Logging Help

I'm working on a request to start logging some additional data for PCI compliance. I need to log who, when, and what changed on a set of tables. I set up SQL auditing which would work fine except ...
1
vote
1answer
1k views

What are some good methods of structuring a MySQL audit trail to be both immutable, and perform well for usage?

In one application, we have an audit table that uses the ArchiveEngine in conjunction with a few triggers to capture 100% of the changes that occur. The upside to this is that 20+ million rows ...
-5
votes
3answers
6k views

How database administrators can see my requests to SQL Server?

I'm a SQL Server 2008 user. I have access to some tables. I need to request few columns from table as I usually do. But I need to do it once (for example) in 5 seconds and system administrators ...
4
votes
4answers
6k views

Can SQL Server Audit be used to track hostnames or IP adresses of the users performing DML on a table?

I have been reading about SQL Server Audit, and so far I have assimilated that it tracks the command that has been executed, and some other additional information(SPID, object ID and stuff). But can ...
3
votes
2answers
2k views

How to find who changed a table value in SQL Server 2014? [duplicate]

We have a few tables on a database called mydb which is being used by applications to store, or retrieve records. Somehow, someone changed a value on the test table and that caused a serious issue. ...
2
votes
1answer
697 views

Find out who ran a query using transaction log backups

We have a SQL Server 2012 Enterprise database running in Full Recovery Model with transaction log backups running every minute. A query was run last night which means we need to recover data from a ...
2
votes
3answers
2k views

Query to find users with passwords same as their username in Oracle

I'm writing an Oracle audit script where I need to find users in a database who have set their passwords to be the same as their username, e.g. dbaadmin/dbaadmin. The query would need to get the list ...
1
vote
1answer
3k views

Find who and when changed a specific value in the database

We recent found some record in a table of an oracle database has been updated to another value.and it has been cause very important mistake. we want to find out who and when has done this? could ...
1
vote
2answers
352 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 ...
1
vote
3answers
169 views

Login report of Sysadmin

We have got a requirement to provide login report from SQL Server for Sysadmin only - This would have log-in date and time when anyone logged into SQL server having sysadmin privilege. Is there ...
0
votes
1answer
2k views

Sql Server audit could not write to the security log

I am following the training kit for 70-462(Administering Microsoft SQL Server 2012 Databases), and stuck on Auditing SQL Server instances lesson. I have created new user in domain controller, assign ...
0
votes
3answers
159 views

Access to tables in SQL Server

I would like to know if there is a table where accesses to tables are saved, per user or per system. I'm using both SQL Server 2005 and 2008.
0
votes
1answer
3k views

Oracle auditing on specific user activity

I want to be able audit user 'SCOTT' on 'SELECT, INSERT, UPDATE, DELETE' dml operations across all objects in the database SCOTT has access to. I'm familiar with dbms_fga but I can't achieve what I'd ...