Mercurial > silverbladetech
comparison 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 |
comparison
equal
deleted
inserted
replaced
87:8bb84cc9ba3f | 88:e84dc4926a5a |
---|---|
1 USE [master] | |
2 GO | |
3 /****** Object: Database [FileMonitoring] Script Date: 01/13/2011 19:12:24 ******/ | |
4 CREATE DATABASE [FileMonitoring] | |
5 GO | |
6 USE [FileMonitoring] | |
7 GO | |
8 /****** Object: Table [dbo].[FileEvents] Script Date: 01/13/2011 19:12:25 ******/ | |
9 SET ANSI_NULLS ON | |
10 GO | |
11 SET QUOTED_IDENTIFIER ON | |
12 GO | |
13 SET ANSI_PADDING ON | |
14 GO | |
15 CREATE TABLE [dbo].[FileEvents]( | |
16 [Id] [int] IDENTITY(1,1) NOT NULL, | |
17 [FileEvent] [varchar](50) NOT NULL, | |
18 [CreateTimestamp] [smalldatetime] NULL, | |
19 CONSTRAINT [PK_FileEvents] PRIMARY KEY CLUSTERED | |
20 ( | |
21 [Id] ASC | |
22 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | |
23 ) ON [PRIMARY] | |
24 GO | |
25 SET ANSI_PADDING OFF | |
26 GO | |
27 /****** Object: StoredProcedure [dbo].[FileEvents_insert] Script Date: 01/13/2011 19:12:31 ******/ | |
28 SET ANSI_NULLS ON | |
29 GO | |
30 SET QUOTED_IDENTIFIER ON | |
31 GO | |
32 -- ============================================= | |
33 -- Author: OSL | |
34 -- Create date: 12/01/2011 | |
35 -- Description: Demo for OSL | |
36 -- ============================================= | |
37 CREATE PROCEDURE [dbo].[FileEvents_insert] | |
38 -- Add the parameters for the stored procedure here | |
39 @FileEvent VARCHAR(50), @Id INT OUTPUT | |
40 AS | |
41 BEGIN | |
42 SET NOCOUNT ON; | |
43 | |
44 -- Insert statements for procedure here | |
45 INSERT dbo.FileEvents (FileEvent) SELECT @FileEvent | |
46 | |
47 SELECT @Id = SCOPE_IDENTITY() | |
48 END | |
49 GO | |
50 /****** Object: Default [DF_FileEvents_CreateTimestamp] Script Date: 01/13/2011 19:12:25 ******/ | |
51 ALTER TABLE [dbo].[FileEvents] ADD CONSTRAINT [DF_FileEvents_CreateTimestamp] DEFAULT (getdate()) FOR [CreateTimestamp] | |
52 GO |