Mercurial > silverbladetech
diff OslFileMonitorService/DatabaseScript.sql @ 88:e84dc4926a5a
OSL work from 2011
author | stevenhollidge <stevenhollidge@hotmail.com> |
---|---|
date | Fri, 27 Apr 2012 08:44:37 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OslFileMonitorService/DatabaseScript.sql Fri Apr 27 08:44:37 2012 +0100 @@ -0,0 +1,52 @@ +USE [master] +GO +/****** Object: Database [FileMonitoring] Script Date: 01/13/2011 19:12:24 ******/ +CREATE DATABASE [FileMonitoring] +GO +USE [FileMonitoring] +GO +/****** Object: Table [dbo].[FileEvents] Script Date: 01/13/2011 19:12:25 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[FileEvents]( + [Id] [int] IDENTITY(1,1) NOT NULL, + [FileEvent] [varchar](50) NOT NULL, + [CreateTimestamp] [smalldatetime] NULL, + CONSTRAINT [PK_FileEvents] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO +SET ANSI_PADDING OFF +GO +/****** Object: StoredProcedure [dbo].[FileEvents_insert] Script Date: 01/13/2011 19:12:31 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +-- ============================================= +-- Author: OSL +-- Create date: 12/01/2011 +-- Description: Demo for OSL +-- ============================================= +CREATE PROCEDURE [dbo].[FileEvents_insert] + -- Add the parameters for the stored procedure here + @FileEvent VARCHAR(50), @Id INT OUTPUT +AS +BEGIN + SET NOCOUNT ON; + + -- Insert statements for procedure here + INSERT dbo.FileEvents (FileEvent) SELECT @FileEvent + + SELECT @Id = SCOPE_IDENTITY() +END +GO +/****** Object: Default [DF_FileEvents_CreateTimestamp] Script Date: 01/13/2011 19:12:25 ******/ +ALTER TABLE [dbo].[FileEvents] ADD CONSTRAINT [DF_FileEvents_CreateTimestamp] DEFAULT (getdate()) FOR [CreateTimestamp] +GO