Solved

10775: audit specification

Posted on 2015-02-17
2
56 Views
Last Modified: 2015-02-21
i have this code

CREATE DATABASE AUDIT SPECIFICATION MarketingSelectSpec
  FOR SERVER AUDIT MarketDevLog
  ADD (SELECT ON SCHEMA::[HumanResources] BY public);
GO

What should I change to audit:
[HumanResources] [Employee] specifically columns. [NationalIDNumber] and [ContactID]
0
Comment
Question by:enrique_aeo
2 Comments
 
LVL 28

Assisted Solution

by:Ryan McCauley
Ryan McCauley earned 250 total points
ID: 40620419
I took a look at MSDN (read here for more details on the command) and it looks like you can change the audit specification to monitor just a single table rather than the whole schema by changing the ADD line from:

ADD (SELECT ON SCHEMA::[HumanResources] BY public);

to:

ADD (SELECT ON object::[HumanResources].[Employee] BY public);

In this case, you're changing the "class" of object to be audited from "schema" to "object" for just that single table.
0
 
LVL 45

Accepted Solution

by:
Vitor Montalvão earned 250 total points
ID: 40620945
Why don't you use the CHANGE TRACKING feature?
ALTER TABLE [HumanResources].[Employee] 
ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON)

Open in new window

NOTE: You may need to enable change tracking for the database. In SSMS do that in the database properties.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now