SQL
USE [PrintMonitor]
GO
/****** Object:  Table [dbo].[Printers]    Script Date: 10/15/2008 21:41:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Printers](
	[Id] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
	[Reboot Count] [int] NOT NULL CONSTRAINT [DF_Printers_Reboot Count]  DEFAULT ((0)),
	[Name] [nvarchar](220) NOT NULL,
	[Location] [nvarchar](1024) NULL,
	[Comment] [nvarchar](1024) NULL,
	[Server Name] [varchar](255) NULL CONSTRAINT [DF_Printers_Server Name]  DEFAULT (host_name()),
	[Share Name] [varchar](255) NULL,
	[Port Name] [varchar](255) NULL,
	[Driver Name] [varchar](255) NULL,
	[Seperator Filename] [varchar](255) NULL,
	[Print Processor] [varchar](255) NULL,
	[Default Data Type] [varchar](255) NULL,
	[Parameters] [varchar](1024) NULL,
	[Monitor] [bit] NOT NULL CONSTRAINT [DF_Printers_Monitor]  DEFAULT ((1)),
	[User Name] [varchar](220) NOT NULL CONSTRAINT [DF_Printers_User Name]  DEFAULT (suser_sname()),
	[Timestamp] [datetime] NOT NULL CONSTRAINT [DF_Printers_Timestamp]  DEFAULT (getdate()),
 CONSTRAINT [PK_Printers] 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 ON
GO
ALTER TABLE [dbo].[Printers]  WITH CHECK ADD  CONSTRAINT [FK_Printers_Print Servers] FOREIGN KEY([Server Name])
REFERENCES [dbo].[Print Servers] ([Name])
GO
ALTER TABLE [dbo].[Printers] CHECK CONSTRAINT [FK_Printers_Print Servers]
go

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

Comments

No comments yet.