/[AnywhereTS-MSSQL]/trunk/TSAdminTool/CreateTables.sql
ViewVC logotype

Annotation of /trunk/TSAdminTool/CreateTables.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (hide annotations) (download)
Wed Jul 11 20:13:17 2012 UTC (8 years, 2 months ago) by william
File size: 4591 byte(s)
+ finish support for creating tables in an empty database (incase the database are pre-created, but contains no tables)
- still have AD login issues when creating the database from scratch (ie. it did not exist to begin with)

1 william 22 USE [master]
2     GO
3     --EXEC dbo.sp_dbcmptlevel @dbname=N'AnywhereTS', @new_cmptlevel=90
4     --GO
5     IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
6     begin
7     EXEC [AnywhereTS].[dbo].[sp_fulltext_database] @action = 'enable'
8     end
9     GO
10     ALTER DATABASE [AnywhereTS] SET ANSI_NULL_DEFAULT OFF
11     GO
12     ALTER DATABASE [AnywhereTS] SET ANSI_NULLS OFF
13     GO
14     ALTER DATABASE [AnywhereTS] SET AUTO_CLOSE ON
15     GO
16     ALTER DATABASE [AnywhereTS] SET MULTI_USER
17     GO
18     USE [AnywhereTS]
19     GO
20     SET ANSI_NULLS ON
21     GO
22     SET QUOTED_IDENTIFIER ON
23     GO
24     -- The AnywhereTS clients. Used by AnywhereTS and Control panel
25     CREATE TABLE [dbo].[Client](
26     [ClientName] [nvarchar](100) NULL,
27     [MacAddress] [nchar](12) NOT NULL,
28     [Group] [int] NULL,
29     [ScreenResolution] [nvarchar](11) NULL,
30     [ScreenColorDepth] [nvarchar](50) NULL,
31     [AutoPlayCD] [bit] NULL,
32     [ServerName] [nvarchar](200) NULL,
33     [SessionType] [nvarchar](50) NULL,
34     [ReconnectPrompt] [bit] NULL,
35     [AudioLevel] [int] NULL,
36     [MouseResolution] [int] NULL,
37     [Comment] [nvarchar](1024) NULL,
38     [Username] [nvarchar](32) NULL,
39     [Password] [nvarchar](32) NULL,
40     [ServerDomain] [nvarchar](32) NULL,
41     [ServerVersion] [nvarchar](50) NULL,
42     [RedirectFloppy] [bit] NULL,
43     [RedirectCD] [bit] NULL,
44     [RedirectSound] [bit] NULL,
45     [DigitalMonitor] [bit] NULL,
46     [IcaProtocol] [nvarchar](30) NULL,
47     [IcaEncryption] [nvarchar](30) NULL,
48     [IcaCompression] [bit] NULL,
49     [IcaAudioQuality] [nvarchar](10) NULL,
50     [MiscFlippedFix] [bit] NULL,
51     [MiscMousefix] [bit] NULL,
52     [MiscNoAcceleration] [bit] NULL,
53     [DailyReboot] [bit] NULL,
54     [KeyboardMap] [nvarchar](12) NULL,
55     [TimeZone] [nvarchar](60) NULL,
56     [RedirectCom1] [bit] NULL,
57     [RedirectCom2] [bit] NULL,
58     [UsbDrive] [int] NULL,
59     [UsbDriveName] [nvarchar](20) NULL,
60     [ServerPort] [int] NULL,
61     [NumLock] [bit] NULL,
62     [Created] [datetime] NULL CONSTRAINT [DF_Client_Created] DEFAULT (getdate()),
63     [Modified] [datetime] NULL CONSTRAINT [DF_Client_Modified] DEFAULT (getdate()),
64     [IcaApplicationSet] [nvarchar](200) NULL,
65     [IcaServer] [nvarchar](200) NULL,
66     [TempString] [nvarchar](200) NULL,
67     [TempBit] [bit] NULL,
68     [TempInt] [int] NULL,
69     CONSTRAINT [PK_Client] PRIMARY KEY CLUSTERED
70     (
71     [MacAddress] ASC
72     )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
73     ) ON [PRIMARY]
74     GO
75     -- The groups that clients can belong to
76     CREATE TABLE [dbo].[Group](
77     [ID] [int] IDENTITY(1,1) NOT NULL,
78     [Parent] [int] NULL,
79     [Name] [nvarchar](50) NULL,
80     CONSTRAINT [PK_Group] PRIMARY KEY CLUSTERED
81     (
82     [ID] ASC
83     )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
84     ) ON [PRIMARY]
85     -- The terminal servers that AnywhereTS is working against
86     CREATE TABLE [dbo].[TerminalServer](
87     [Path] [nvarchar](255) NOT NULL,
88     CONSTRAINT [PK_TerminalServer] PRIMARY KEY CLUSTERED
89     (
90     [Path] ASC
91     )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
92     ) ON [PRIMARY]
93     GO
94     -- External TFTP server root directories that AnywhereTS is working against
95     CREATE TABLE [dbo].[TftpServer](
96     [Path] [nvarchar](255) NOT NULL,
97     [LocalPath] [nvarchar](255) NULL,
98     CONSTRAINT [PK_TftpServer] PRIMARY KEY CLUSTERED
99     (
100     [Path] ASC
101     )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
102     ) ON [PRIMARY]
103     -- Client images design time options
104     CREATE TABLE [dbo].[Image](
105     [UseDHCP] [bit] NULL,
106     [ClientIPAddress] [nvarchar](39) NULL,
107     [ClientIPNetmask] [nvarchar](39) NULL,
108     [ClientIPGateway] [nvarchar](39) NULL,
109     [ClientIPDNS1] [nvarchar](39) NULL,
110     [ClientIPDNS2] [nvarchar](39) NULL,
111     [ClientIPDNSSuffix] [nvarchar](200) NULL,
112     [ClientBootServer] [nvarchar](200) NULL,
113     [ConfigFile] [bit] NULL,
114     [OnlyUseRDP] [bit] NULL,
115     [BootPicture] [int] NULL,
116     [NetworkDriver] [nvarchar](100) NULL,
117     [SoundType] [int] NULL,
118     [SoundDriver] [nvarchar](100) NULL,
119     [Name] [nvarchar](50) NOT NULL,
120     [GraphicsDriver] [nvarchar](100) NULL,
121     [Debug] [int] NULL,
122     [BootPackage] [int] NULL,
123     [BootPictureWidth] [int] NULL,
124     [BootPictureHeight] [int] NULL,
125     [BootPictureProgressBar] [int] NULL,
126     [BootPicturePng] [image] NULL,
127    
128     CONSTRAINT [PK_Image] PRIMARY KEY CLUSTERED
129     (
130     [Name] ASC
131     )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
132     ) ON [PRIMARY]
133     GO
134     --This table is used to identify the version of the database
135     CREATE TABLE [dbo].[AppInfo]
136     (Property nvarchar(255) NOT NULL,
137     Value nvarchar(255),
138     CONSTRAINT [PK_AppInfo] PRIMARY KEY CLUSTERED
139     (
140     [Property] ASC
141     )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
142     ) ON [PRIMARY]
143     GO
144     INSERT INTO [dbo].[AppInfo] Values('Version','1.0.0.3')
145     GO
146     Use [Master]
147     GO
148     --EXEC sp_detach_db 'AnywhereTS'
149     --GO

  ViewVC Help
Powered by ViewVC 1.1.22