IF EXISTS (SELECT * FROM dbo.sysobjects
WHERE id = OBJECT_ID(N'[DF_ProcLog_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ProcLog] DROP CONSTRAINT [DF_ProcLog_Time]
END
GO
/****** Object: Table [dbo].[ProcLog] Script Date: 03/20/2010 12:39:29 ******/
IF EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[ProcLog]') AND type in (N'U'))
DROP TABLE [dbo].[ProcLog]
GO
/****** Object: Table [dbo].[ProcLog] Script Date: 03/20/2010 12:39:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ProcLog](
[ProcLogId] [bigint] IDENTITY(1,1) NOT NULL, --this is the PK
[TimeStamp] [timestamp] NULL, -- just a timestamp
[Time] [datetime] NULL, --the date
[NiceTime] [varchar](200) NULL, -- th
[SqlLogin] [varchar](200) NOT NULL, -- which Sql login intstantiated this CALL ?!
[DomainName] [varchar](200) NULL , --if a separate Domain Name credentials are used
[Msg] [varchar](4000) NULL, --the msg to log could be shown to end user
[DebugMsg] [varchar](4000) NULL, --the debug msg aimed for Advanced Application Support
CONSTRAINT [PK_ProcLogId] PRIMARY KEY CLUSTERED
(
[ProcLogId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
/* <doc>
Provides a single storage place for Proc calls
</doc> */
GO
ALTER TABLE [dbo].[ProcLog] ADD CONSTRAINT [DF_ProcLog_Time] DEFAULT (getdate()) FOR [Time]
GO
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!