SQL
USE [PrintMonitor]
GO
/****** Object:  Table [dbo].[Print Jobs]    Script Date: 10/15/2008 21:32:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Print Jobs](
	[Printer Id] [numeric](18, 0) NOT NULL,
	[Printer Reboot Count] [int] NOT NULL CONSTRAINT [DF_Print Jobs_Printer Reboot Count]  DEFAULT ((0)),
	[Job Id] [int] NOT NULL,
	[Submitted] [datetime] NOT NULL,
	[User name] [nvarchar](255) NOT NULL,
	[Document Name] [nvarchar](255) NOT NULL,
	[Machine Name] [nvarchar](255) NOT NULL,
	[Pages] [int] NOT NULL CONSTRAINT [DF_Print Jobs_Pages]  DEFAULT ((1)),
	[Copies] [int] NOT NULL CONSTRAINT [DF_Print Jobs_Copies]  DEFAULT ((1)),
	[Paper Type] [varchar](40) NOT NULL,
	[Landscape] [bit] NOT NULL CONSTRAINT [DF_Print Jobs_Landscape]  DEFAULT ((0)),
	[Colour] [bit] NOT NULL CONSTRAINT [DF_Print Jobs_Colour]  DEFAULT ((0)),
	[Paper Source] [varchar](20) NOT NULL CONSTRAINT [DF_Print Jobs_Paper Source]  DEFAULT ('Auto'),
	[Resolution] [varchar](20) NOT NULL,
	[Data Type] [varchar](20) NULL,
	[Paper Width] [int] NULL,
	[Paper Height] [int] NULL,
	[Printer Resolution X] [int] NULL,
	[Printer Resolution Y] [int] NULL,
	[Notify User Name] [varchar](255) NULL,
	[Print Processor Name] [varchar](255) NULL,
	[Driver Name] [varchar](255) NULL,
	[Parameters] [varchar](255) NULL,
	[Printed] [bit] NULL CONSTRAINT [DF_Print Jobs_Printed]  DEFAULT ((0)),
	[Deleted] [bit] NULL CONSTRAINT [DF_Print Jobs_Deleted]  DEFAULT ((0)),
	[Pages Printed] [int] NULL,
 CONSTRAINT [PK_Print Jobs] PRIMARY KEY CLUSTERED 
(
	[Printer Id] ASC,
	[Printer Reboot Count] ASC,
	[Job Id] ASC,
	[Submitted] 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 ON
GO
ALTER TABLE [dbo].[Print Jobs]  WITH NOCHECK ADD  CONSTRAINT [FK_Print Jobs_Printers] FOREIGN KEY([Printer Id])
REFERENCES [dbo].[Printers] ([Id])
GO
ALTER TABLE [dbo].[Print Jobs] CHECK CONSTRAINT [FK_Print Jobs_Printers]
go

Last edited Oct 15, 2008 at 8:34 PM by Merrion, version 1

Comments

No comments yet.