Which four Transact-SQL statements should you use?

You administer a Microsoft SQL Server 2012 server that has a database named Contoso.
The Contoso database has a table named ProductPrices in a schema named Sales.
You need to create a script that writes audit events into the application log whenever data in the ProductPrices
table is updated.
Which four Transact-SQL statements should you use? (To answer, move the appropriate statements from the
list of statements to the answer area and arrange them in the correct order.)

Build List and Reorder:

You administer a Microsoft SQL Server 2012 server that has a database named Contoso.
The Contoso database has a table named ProductPrices in a schema named Sales.
You need to create a script that writes audit events into the application log whenever data in the ProductPrices
table is updated.
Which four Transact-SQL statements should you use? (To answer, move the appropriate statements from the
list of statements to the answer area and arrange them in the correct order.)

Build List and Reorder:

Answer:

Explanation:

Reference: http://msdn.microsoft.com/en-us/library/cc280386.aspx
Reference: http://msdn.microsoft.com/en-us/library/cc280448.aspx
Reference: http://msdn.microsoft.com/en-us/library/cc280404.aspx



Leave a Reply 8

Your email address will not be published. Required fields are marked *


Lucas Almeida

Lucas Almeida

The correct is:

use master
GO
create server audit C_Audit to application_log
alter server audit C_Audit with (State = on)
GO
use ContosoDB
GO
create database audit specification C_AuditSpec
for server audit C_Audit
Add (update on [Sales].[ProductPrices] by DBO)
alter database audit specification C_AuditSpec
with (State = on)

jzed

jzed

is this correct?

Slazenjer_m

Slazenjer_m

This jzed guy is such a lazy ass… he’d keep asking “is this correct” for every question!! Can’t you do some of your own research?! Lazy f@#k!!

jzed

jzed

@Slazenjer_m

f*ck you too!!!

Islam

Islam

Agreed with Slazenjer LAZY F@CK!
Kind of annoying!

jzed

jzed

^

f*ck you too!

Donk

Donk

Agreed with Slazenger and Islam…..jzed you’re lazy!

Barry figgins

Barry figgins

jzed can’t be that lazy, s/he’s been studying for a whole month. Stupid yes. I can tell you how relevant her/his “Is this correct” posts have been, but he certainly puts in effort.