audit

SQL Server database audit selects, failed logins and executed code for entire database, all objects

柔情痞子 提交于 2020-01-07 03:12:05
问题 I want to track all failed logins to our production environment. Including all selects to all objects. Based on: https://www.simple-talk.com/sql/database-administration/sql-server-audit-magic-without-a-wizard/ and https://www.simple-talk.com/sql/database-administration/sql-server-security-audit-basics/ and in particular: https://blogs.msdn.microsoft.com/sreekarm/2009/01/05/auditing-select-statements-in-sql-server-2008/ It suggests I need to name each object, in the schema for me to be able to

How user could connect as SYSDBA and run a Grant?

∥☆過路亽.° 提交于 2020-01-06 19:31:38
问题 In our system we run audits and are confused by a username that's showing up where it shouldn't. OS USER USERNAME USERHOST Timestamp OWNER OBJ_NAME GRANTEE PRIV_USED ------- -------- -------- ------------- ----- -------- -------- ------------- SECSEC Tom INTER\SEC 1/27/2013 6:28 null null null CREATE SESSION SECSEC SysDBA INTER\SEC 1/27/2013 6:28 null null null CREATE SESSION SECSEC Tom INTER\SEC 1/27/2013 6:29 null null null CREATE SESSION SECSEC SysDBA INTER\SEC 1/27/2013 6:29 null null

Why does overriding change column names

时光毁灭记忆、已成空白 提交于 2020-01-04 04:00:04
问题 I was using the default implementation of the rev listener and as expected the columns in my REVINFO table were: revtstmp and rev. However, when I overrode the default - all I did was: ... MyRevisionEntity extends DefaultRevisionEntity those column names were changed to "timestamp" and "id". Anyone know why? Using envers 4.1.5_Final... ** EDIT ** As no one has yet answered, I am adding more information. The Adam Warski authored "DefaultRevisionEntity" class defines only two members: private

Why does overriding change column names

大兔子大兔子 提交于 2020-01-04 03:59:31
问题 I was using the default implementation of the rev listener and as expected the columns in my REVINFO table were: revtstmp and rev. However, when I overrode the default - all I did was: ... MyRevisionEntity extends DefaultRevisionEntity those column names were changed to "timestamp" and "id". Anyone know why? Using envers 4.1.5_Final... ** EDIT ** As no one has yet answered, I am adding more information. The Adam Warski authored "DefaultRevisionEntity" class defines only two members: private

How can I customize the AuditingHandler injected by Spring-Data when using Auditing?

不想你离开。 提交于 2020-01-01 04:51:09
问题 I'm using Spring Data 1.5 and Auditing. Part of the AuditingEntityListener has a setAuditingHandler method. How can I customize the AuditingHandler and instruct Spring-Data to inject my custom handler instead of the default org.springframework.data.auditing.AuditingHandler ? I've tried instantiating my own AuditingEntityListener in which I inject my own Handler, but that is not doing the job. The default handler is still being injected. I've tried both via XML configuration and JavaConfig to

mysql (almost) complete auditing

时光怂恿深爱的人放手 提交于 2020-01-01 03:51:06
问题 I'm looking for a way of making simple event log for my tables. I have few tables that can be changed by various users, and I want to keep track on: - who made the change - when - what was before update - what is the new value - which table and which record & column somthing like will be great: 20:00:00 | john | update | products | 113 | product_name | "xbox" | "xbox 360" 20:00:10 | jim | update | products | 113 | product_name | "xbox 360" | "" 20:01:00 | jim | delete | products | 113 So i

Entity Framework 7 audit log

戏子无情 提交于 2020-01-01 03:32:05
问题 I am porting an old project over to ASP.NET 5 and Entity Framework 7. I have used the database first approach (DNX scaffold) to create the model. The old project is based on Entity Framework 4 and audit tracking is implemented by overriding the SaveChanges method of the DbContext : public override int SaveChanges(System.Data.Objects.SaveOptions options) { int? UserId = null; if (System.Web.HttpContext.Current != null) UserId = (from user in Users.Where(u => u.UserName == System.Web

How do you implement audit trail for your objects (Programming)?

*爱你&永不变心* 提交于 2020-01-01 02:44:13
问题 I need to implement an audit trail for Add/Edit/Delete on my objects,I'm using an ORM (XPO) for defining my objects etc. I implemented an audit trail object that is triggered on OnSaving OnDeleting Of the base object, and I store the changes in Audit-AuditTrail (Mast-Det) table, for field changes. etc. using some method services called. How do you implement audit trail in you OOP code? Please share your insights? Any patterns etc? Best practices etc? Another thing is that how to disable audit

What's the PostgreSQL equivalent of MSSQL's CONTEXT_INFO?

江枫思渺然 提交于 2019-12-29 08:55:34
问题 In relation to my other question "What’s the best way to audit log DELETEs?". What's the PostgreSQL equivalent of CONTEXT_INFO? [EDIT] I want to log deletes using trigger, but since i'm not using the database user as my app's logical user, I cannot log the CURRENT_USER from the trigger code as the user who deleted the record. But for INSERT and UPDATE it is possible to log the record changes from trigger since you can just add a user field in the record, say inserted_by and last_updated_by,

Can I use Spring Data JPA Auditing without the orm.xml file (using JavaConfig instead)?

倖福魔咒の 提交于 2019-12-29 06:41:11
问题 I'm trying to get Spring Data Auditing to work in my Spring 3.2.8 / Spring Data 1.5 / Hibernate 4 project. As per the Spring Data Auditing docs, I've added the @CreatedBy , etc annotations to my entities, created by AuditorAware implementation, and instantiated it from within my JavaConfig. However, it never seems to fire. I find the docs a little confusing. It appears that the JavaConfig entry replaces the xml entry, but I am not sure. I don't currently have any orm.xml file in my