Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Development
Samples
 DatabaseLog Table (AdventureWorks)

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
SQL Server 2008 Books Online (June 2009)
DatabaseLog Table (AdventureWorks)

Records all data definition language (DDL) statements made to the database over time. The table is populated by a DDL trigger that fires every time a DDL statement is executed. For example, if a user created a new index or modified a table column, the occurrence of that event, including the exact Transact-SQL statement executed, is stored in the DatabaseLog table.

The DatabaseLog table is contained in the dbo schema.

Column Data type Nullability Description

DatabaseLogID

int

Not null

Primary key for DatabaseLog rows.

PostTime

datetime

Not null

Date and time the DDL statement was executed.

DatabaseUser

sysname

Not null

Name of the user who executed the statement.

Event

sysname

Not null

Type of event executed. For example, CREATE TABLE or ALTER INDEX.

Schema

sysname

Null

The schema that owns the modified object.

Object

sysname

Null

The modified object.

TSQL

nvarchar(max)

Not null

The Transact-SQL statement that was executed.

XmlEvent

xml

Not null

The event data captured by the DDL trigger including the server name, logon name, and SPID.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker