ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/TSAdminTool/CreateTables.sql
Revision: 123
Committed: Sat Jul 14 11:14:09 2012 UTC (10 years, 10 months ago) by william
Content type: application/sql
File size: 4507 byte(s)
Log Message:
+ bulk commit
-- add SQLSerer SMO support for executing TSQL commands

File Contents

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