Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

290 lines
11 KiB

  1. /****** Object: Login OcaDebug Script Date: 2002/06/20 13:55:07 ******/
  2. if not exists (select * from master.dbo.syslogins where loginname = N'OcaDebug')
  3. BEGIN
  4. declare @logindb nvarchar(132), @loginlang nvarchar(132) select @logindb = N'CrashDB3', @loginlang = N'us_english'
  5. if @logindb is null or not exists (select * from master.dbo.sysdatabases where name = @logindb)
  6. select @logindb = N'master'
  7. if @loginlang is null or (not exists (select * from master.dbo.syslanguages where name = @loginlang) and @loginlang <> N'us_english')
  8. select @loginlang = @@language
  9. exec sp_addlogin N'OcaDebug', null, @logindb, @loginlang
  10. END
  11. GO
  12. /****** Object: Login Web_RO Script Date: 2002/06/20 13:55:07 ******/
  13. if not exists (select * from master.dbo.syslogins where loginname = N'Web_RO')
  14. BEGIN
  15. declare @logindb nvarchar(132), @loginlang nvarchar(132) select @logindb = N'master', @loginlang = N'us_english'
  16. if @logindb is null or not exists (select * from master.dbo.sysdatabases where name = @logindb)
  17. select @logindb = N'master'
  18. if @loginlang is null or (not exists (select * from master.dbo.syslanguages where name = @loginlang) and @loginlang <> N'us_english')
  19. select @loginlang = @@language
  20. exec sp_addlogin N'Web_RO', null, @logindb, @loginlang
  21. END
  22. GO
  23. /****** Object: Login WEB_RW Script Date: 2002/06/20 13:55:07 ******/
  24. if not exists (select * from master.dbo.syslogins where loginname = N'WEB_RW')
  25. BEGIN
  26. declare @logindb nvarchar(132), @loginlang nvarchar(132) select @logindb = N'master', @loginlang = N'us_english'
  27. if @logindb is null or not exists (select * from master.dbo.sysdatabases where name = @logindb)
  28. select @logindb = N'master'
  29. if @loginlang is null or (not exists (select * from master.dbo.syslanguages where name = @loginlang) and @loginlang <> N'us_english')
  30. select @loginlang = @@language
  31. exec sp_addlogin N'WEB_RW', null, @logindb, @loginlang
  32. END
  33. GO
  34. /****** Object: User OcaDebug Script Date: 2002/06/20 13:55:07 ******/
  35. if not exists (select * from dbo.sysusers where name = N'OcaDebug' and uid < 16382)
  36. EXEC sp_grantdbaccess N'OcaDebug', N'OcaDebug'
  37. GO
  38. /****** Object: User Web_RO Script Date: 2002/06/20 13:55:07 ******/
  39. if not exists (select * from dbo.sysusers where name = N'Web_RO' and uid < 16382)
  40. EXEC sp_grantdbaccess N'Web_RO', N'Web_RO'
  41. GO
  42. /****** Object: User WEB_RW Script Date: 2002/06/20 13:55:07 ******/
  43. if not exists (select * from dbo.sysusers where name = N'WEB_RW' and uid < 16382)
  44. EXEC sp_grantdbaccess N'WEB_RW', N'WEB_RW'
  45. GO
  46. /****** Object: User OcaDebug Script Date: 2002/06/20 13:55:08 ******/
  47. exec sp_addrolemember N'db_datareader', N'OcaDebug'
  48. GO
  49. /****** Object: User Web_RO Script Date: 2002/06/20 13:55:08 ******/
  50. exec sp_addrolemember N'db_datareader', N'Web_RO'
  51. GO
  52. /****** Object: User OcaDebug Script Date: 2002/06/20 13:55:08 ******/
  53. exec sp_addrolemember N'db_datawriter', N'OcaDebug'
  54. GO
  55. /****** Object: User Web_RO Script Date: 2002/06/20 13:55:08 ******/
  56. exec sp_addrolemember N'db_denydatawriter', N'Web_RO'
  57. GO
  58. /****** Object: Table [dbo].[Contacts] Script Date: 5/17/2002 5:56:18 PM ******/
  59. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Contacts]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  60. drop table [dbo].[Contacts]
  61. GO
  62. /****** Object: Table [dbo].[Contacts] Script Date: 5/17/2002 5:56:18 PM ******/
  63. CREATE TABLE [dbo].[Contacts] (
  64. [ContactID] [int] IDENTITY(1,1) NOT NULL ,
  65. [CompanyName] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  66. [CompanyAddress1] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  67. [CompanyAddress2] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  68. [CompanyCity] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  69. [CompanyState] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  70. [CompanyZip] [nvarchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  71. [CompanyMainPhone] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  72. [CompanySupportPhone] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  73. [CompanyFax] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  74. [CompanyWebSite] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  75. [ContactName] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  76. [ContactOccupation] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  77. [ContactAddress1] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  78. [ContactAddress2] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  79. [ContactCity] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  80. [ContactState] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  81. [ContactZip] [nvarchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  82. [ContactPhone] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  83. [ContactEMail] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  84. ) ON [PRIMARY]
  85. GO
  86. /****** Object: Table [dbo].[DeliveryTypeMap] Script Date: 5/17/2002 5:56:18 PM ******/
  87. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DeliveryTypeMap]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  88. drop table [dbo].[DeliveryTypeMap]
  89. GO
  90. /****** Object: Table [dbo].[DeliveryTypeMap] Script Date: 5/17/2002 5:56:19 PM ******/
  91. CREATE TABLE [dbo].[DeliveryTypeMap] (
  92. [MapID] [int] NOT NULL ,
  93. [SolutionTypeID] [int] NOT NULL ,
  94. [DeliveryTypeID] [int] NOT NULL
  95. ) ON [PRIMARY]
  96. GO
  97. /****** Object: Table [dbo].[DeliveryTypes] Script Date: 5/17/2002 5:56:18 PM ******/
  98. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DeliveryTypes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  99. drop table [dbo].[DeliveryTypes]
  100. GO
  101. /****** Object: Table [dbo].[DeliveryTypes] Script Date: 5/17/2002 5:56:19 PM ******/
  102. CREATE TABLE [dbo].[DeliveryTypes] (
  103. [DeliveryID] [int] NOT NULL ,
  104. [DeliveryType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  105. ) ON [PRIMARY]
  106. GO
  107. /****** Object: Table [dbo].[HelpInfo] Script Date: 5/17/2002 5:56:18 PM ******/
  108. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[HelpInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  109. drop table [dbo].[HelpInfo]
  110. GO
  111. /****** Object: Table [dbo].[HelpInfo] Script Date: 5/17/2002 5:56:19 PM ******/
  112. CREATE TABLE [dbo].[HelpInfo] (
  113. [iStopCode] [int] NOT NULL ,
  114. [StopCode] [nvarchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  115. [Lang] [nvarchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  116. [KBs] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  117. ) ON [PRIMARY]
  118. GO
  119. /****** Object: Table [dbo].[MSSolution] Script Date: 5/17/2002 5:56:18 PM ******/
  120. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MSSolution]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  121. drop table [dbo].[MSSolution]
  122. GO
  123. /****** Object: Table [dbo].[MSSolution] Script Date: 5/17/2002 5:56:19 PM ******/
  124. CREATE TABLE [dbo].[MSSolution] (
  125. [MSSolutionID] [int] NOT NULL ,
  126. [SolutionProvider] [nvarchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  127. [SolutionText] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  128. [LastUpdated] [smalldatetime] NOT NULL
  129. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  130. GO
  131. /****** Object: Table [dbo].[Modules] Script Date: 5/17/2002 5:56:18 PM ******/
  132. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Modules]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  133. drop table [dbo].[Modules]
  134. GO
  135. /****** Object: Table [dbo].[Modules] Script Date: 5/17/2002 5:56:20 PM ******/
  136. CREATE TABLE [dbo].[Modules] (
  137. [ModuleID] [int] IDENTITY(1,1) NOT NULL ,
  138. [ModuleName] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  139. ) ON [PRIMARY]
  140. GO
  141. /****** Object: Table [dbo].[Products] Script Date: 5/17/2002 5:56:18 PM ******/
  142. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Products]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  143. drop table [dbo].[Products]
  144. GO
  145. /****** Object: Table [dbo].[Products] Script Date: 5/17/2002 5:56:20 PM ******/
  146. CREATE TABLE [dbo].[Products] (
  147. [ProductID] [int] IDENTITY(1,1) NOT NULL ,
  148. [ProductName] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  149. ) ON [PRIMARY]
  150. GO
  151. /****** Object: Table [dbo].[SolutionTypes] Script Date: 5/17/2002 5:56:18 PM ******/
  152. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SolutionTypes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  153. drop table [dbo].[SolutionTypes]
  154. GO
  155. /****** Object: Table [dbo].[SolutionTypes] Script Date: 5/17/2002 5:56:20 PM ******/
  156. CREATE TABLE [dbo].[SolutionTypes] (
  157. [SolutionTypeID] [int] NOT NULL ,
  158. [SolutionTypeName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  159. ) ON [PRIMARY]
  160. GO
  161. /****** Object: Table [dbo].[SolvedBuckets] Script Date: 5/17/2002 5:56:18 PM ******/
  162. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SolvedBuckets]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  163. drop table [dbo].[SolvedBuckets]
  164. GO
  165. /****** Object: Table [dbo].[SolvedBuckets] Script Date: 5/17/2002 5:56:21 PM ******/
  166. CREATE TABLE [dbo].[SolvedBuckets] (
  167. [SolutionID] [int] NOT NULL ,
  168. [SolutionType] [tinyint] NOT NULL ,
  169. [BucketID] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
  170. ) ON [PRIMARY]
  171. GO
  172. CREATE CLUSTERED INDEX [IX_SolvedBuckets] ON [dbo].[SolvedBuckets]([BucketID]) ON [PRIMARY]
  173. GO
  174. CREATE INDEX [IX_SolvedBuckets_1] ON [dbo].[SolvedBuckets]([SolutionID]) ON [PRIMARY]
  175. GO
  176. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SolutionEx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  177. drop table [dbo].[SolutionEx]
  178. GO
  179. CREATE TABLE [dbo].[SolutionEx] (
  180. [SolutionType] [tinyint] NULL ,
  181. [DeliveryType] [tinyint] NULL ,
  182. [SP] [tinyint] NULL ,
  183. [CrashType] [tinyint] NULL ,
  184. [SolutionID] [int] IDENTITY(1,1) NOT NULL ,
  185. [TemplateID] [int] NULL ,
  186. [ProductID] [int] NULL ,
  187. [ContactID] [int] NULL ,
  188. [ModuleID] [int] NULL ,
  189. [BugID] [nvarchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  190. [QueryData] [nvarchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  191. [Description] [nvarchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  192. ) ON [PRIMARY]
  193. GO
  194. CREATE CLUSTERED INDEX [IX_SolutionEx] ON [dbo].[SolutionEx]([SolutionID]) ON [PRIMARY]
  195. GO
  196. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Templates]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  197. drop table [dbo].[Templates]
  198. GO
  199. CREATE TABLE [dbo].[Templates] (
  200. [TemplateID] [int] NOT NULL ,
  201. [Lang] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
  202. [Description] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  203. [TemplateName] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  204. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  205. GO