怎么创建sql server 2008创建个数据记录所有的库和表都进行过什么操作?保存所有对数据库进行操作的记录。然后以邮件的方式进行操作!
------解决方案--------------------
建表....
USE [AuditDB]
GO
/****** Object: Table [dbo].[DDLEvents] Script Date: 11/20/2012 14:29:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DDLEvents](
[EventDate] [datetime] NOT NULL,
[EventType] [nvarchar](64) NULL,
[EventDDL] [nvarchar](max) NULL,
[EventXML] [xml] NULL,
[DatabaseName] [nvarchar](255) NULL,
[SchemaName] [nvarchar](255) NULL,
[ObjectName] [nvarchar](255) NULL,
[HostName] [varchar](64) NULL,
[IPAddress] [varchar](32) NULL,
[ProgramName] [nvarchar](255) NULL,
[LoginName] [nvarchar](255) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[DDLEvents] ADD DEFAULT (getdate()) FOR [EventDate]
GO