AdventureWorks
dbo.DatabaseLog Table
Description
Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog.
Properties
Creation Date08/01/2010 08:40
File GroupPRIMARY
Text File GroupPRIMARY
System Object
Published for Replication
Rows1566
Data Space Used6,264.00 KB
Index Space Used48.00 KB
Columns
 Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
Primary Key DatabaseLogIDPrimary key for DatabaseLog records.int4   
 PostTimeThe date and time the DDL change occurred.datetime4   
 DatabaseUserThe user who implemented the DDL change.sysname128   
 EventThe type of DDL statement that was executed.sysname128   
 SchemaThe schema to which the changed object belongs.sysname128  
 ObjectThe object that was changed by the DDL statment.sysname128  
 TSQLThe exact Transact-SQL statement that was executed.nvarchar16   
 XmlEventThe raw XML data generated by database trigger.Xml16   
Indexes
IndexDescriptionPrimaryUnique
PK_DatabaseLog_DatabaseLogIDPrimary key (nonclustered) constraint
SQL
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[DatabaseLog](
	[DatabaseLogID] [int] IDENTITY(1,1) NOT NULL,
	[PostTime] [datetime] NOT NULL,
	[DatabaseUser] [sysname] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[Event] [sysname] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[Schema] [sysname] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Object] [sysname] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[TSQL] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[XmlEvent] [xml] NOT NULL,
 CONSTRAINT [PK_DatabaseLog_DatabaseLogID] PRIMARY KEY NONCLUSTERED 
(
	[DatabaseLogID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
See Also

Related Objects

dbo Schema
AdventureWorks Database

 

 


© 2012 All Rights Reserved.

Send comments on this topic.