Solved

10775: audit specification

Posted on 2015-02-17
2
60 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 46

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Backup & Restore 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.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

920 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

14 Experts available now in Live!

Get 1:1 Help Now