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.

523 lines
15 KiB

  1. /****** Object: Stored Procedure dbo.DBGPortal_ClearPoolCorruption Script Date: 2002-07-25 5:15:06 ******/
  2. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_ClearPoolCorruption]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  3. drop procedure [dbo].[DBGPortal_ClearPoolCorruption]
  4. GO
  5. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketComments Script Date: 2002-07-25 5:15:06 ******/
  6. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketComments]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7. drop procedure [dbo].[DBGPortal_GetBucketComments]
  8. GO
  9. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketCrashes Script Date: 2002-07-25 5:15:06 ******/
  10. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketCrashes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  11. drop procedure [dbo].[DBGPortal_GetBucketCrashes]
  12. GO
  13. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketData Script Date: 2002-07-25 5:15:06 ******/
  14. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketData]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  15. drop procedure [dbo].[DBGPortal_GetBucketData]
  16. GO
  17. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketStatsByAlias Script Date: 2002-07-25 5:15:06 ******/
  18. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketStatsByAlias]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  19. drop procedure [dbo].[DBGPortal_GetBucketStatsByAlias]
  20. GO
  21. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketStatus Script Date: 2002-07-25 5:15:06 ******/
  22. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  23. drop procedure [dbo].[DBGPortal_GetBucketStatus]
  24. GO
  25. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketsByAlias Script Date: 2002-07-25 5:15:06 ******/
  26. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketsByAlias]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  27. drop procedure [dbo].[DBGPortal_GetBucketsByAlias]
  28. GO
  29. /****** Object: Stored Procedure dbo.DBGPortal_GetCommentActions Script Date: 2002-07-25 5:15:06 ******/
  30. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetCommentActions]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  31. drop procedure [dbo].[DBGPortal_GetCommentActions]
  32. GO
  33. /****** Object: Stored Procedure dbo.DBGPortal_GetDeliveryTypes Script Date: 2002-07-25 5:15:06 ******/
  34. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetDeliveryTypes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  35. drop procedure [dbo].[DBGPortal_GetDeliveryTypes]
  36. GO
  37. /****** Object: Stored Procedure dbo.DBGPortal_GetFollowUpIDs Script Date: 2002-07-25 5:15:06 ******/
  38. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetFollowUpIDs]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  39. drop procedure [dbo].[DBGPortal_GetFollowUpIDs]
  40. GO
  41. /****** Object: Stored Procedure dbo.DBGPortal_GetRaidedBuckets Script Date: 2002-07-25 5:15:06 ******/
  42. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetRaidedBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  43. drop procedure [dbo].[DBGPortal_GetRaidedBuckets]
  44. GO
  45. /****** Object: Stored Procedure dbo.DBGPortal_GetResolvedBuckets Script Date: 2002-07-25 5:15:06 ******/
  46. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetResolvedBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  47. drop procedure [dbo].[DBGPortal_GetResolvedBuckets]
  48. GO
  49. /****** Object: Stored Procedure dbo.DBGPortal_GetSolutionTypes Script Date: 2002-07-25 5:15:06 ******/
  50. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetSolutionTypes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  51. drop procedure [dbo].[DBGPortal_GetSolutionTypes]
  52. GO
  53. /****** Object: Stored Procedure dbo.DBGPortal_GetUnsolvedBuckets Script Date: 2002-07-25 5:15:06 ******/
  54. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetUnsolvedBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  55. drop procedure [dbo].[DBGPortal_GetUnsolvedBuckets]
  56. GO
  57. /****** Object: Stored Procedure dbo.DBGPortal_SetBucketBugNumber Script Date: 2002-07-25 5:15:06 ******/
  58. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SetBucketBugNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  59. drop procedure [dbo].[DBGPortal_SetBucketBugNumber]
  60. GO
  61. /****** Object: Stored Procedure dbo.DBGPortal_SetComment Script Date: 2002-07-25 5:15:06 ******/
  62. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SetComment]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  63. drop procedure [dbo].[DBGPortal_SetComment]
  64. GO
  65. /****** Object: Stored Procedure dbo.DBGPortal_SetPoolCorruption Script Date: 2002-07-25 5:15:06 ******/
  66. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SetPoolCorruption]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  67. drop procedure [dbo].[DBGPortal_SetPoolCorruption]
  68. GO
  69. /****** Object: Stored Procedure dbo.DBGPortal_UpdateStaticDataBugID Script Date: 2002-07-25 5:15:06 ******/
  70. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_UpdateStaticDataBugID]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  71. drop procedure [dbo].[DBGPortal_UpdateStaticDataBugID]
  72. GO
  73. SET QUOTED_IDENTIFIER OFF
  74. GO
  75. SET ANSI_NULLS OFF
  76. GO
  77. /****** Object: Stored Procedure dbo.DBGPortal_ClearPoolCorruption Script Date: 2002-07-25 5:15:07 ******/
  78. CREATE PROCEDURE DBGPortal_ClearPoolCorruption (
  79. @BucketID varchar(100)
  80. ) AS
  81. UPDATE BucketToInt SET PoolCorruption = NULL WHERE BucketID = @BucketID
  82. GO
  83. SET QUOTED_IDENTIFIER OFF
  84. GO
  85. SET ANSI_NULLS ON
  86. GO
  87. SET QUOTED_IDENTIFIER OFF
  88. GO
  89. SET ANSI_NULLS OFF
  90. GO
  91. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketComments Script Date: 2002-07-25 5:15:07 ******/
  92. CREATE PROCEDURE DBGPortal_GetBucketComments(
  93. @BucketID varchar(100)
  94. ) AS
  95. select EntryDate, CommentBy, Action, Comment from comments where BucketID = @BucketID order by entrydate desc
  96. GO
  97. SET QUOTED_IDENTIFIER OFF
  98. GO
  99. SET ANSI_NULLS ON
  100. GO
  101. SET QUOTED_IDENTIFIER OFF
  102. GO
  103. SET ANSI_NULLS OFF
  104. GO
  105. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketCrashes Script Date: 2002-07-25 5:15:08 ******/
  106. CREATE PROCEDURE DBGPortal_GetBucketCrashes(
  107. @BucketID varchar(100)
  108. ) AS
  109. select top 300 bFullDump, SKU, BuildNo, Source, EntryDate, FilePath, Email from dbgportal_crashdatav3 where BucketID = @BucketID order by bFullDump desc, Source desc, BuildNo desc, Email desc, entrydate desc
  110. GO
  111. SET QUOTED_IDENTIFIER OFF
  112. GO
  113. SET ANSI_NULLS ON
  114. GO
  115. SET QUOTED_IDENTIFIER OFF
  116. GO
  117. SET ANSI_NULLS OFF
  118. GO
  119. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketData Script Date: 2002-07-25 5:15:08 ******/
  120. CREATE PROCEDURE DBGPortal_GetBucketData(
  121. @BucketID varchar(100)
  122. ) AS
  123. --select iBucket, FollowUp, BTI.iDriverName, DriverName, PoolCorruption, Platform, MoreData from BucketToInt as BTI
  124. --left join FollowUpids as F on f.iFollowUp = BTI.iFollowUp
  125. --left join DrNames as D on D.iDriverName = BTI.iDriverName
  126. --where BTI.BucketID = @BucketID
  127. select BTI.iBucket, FollowUp, BTI.iDriverName,D.DriverName, PoolCorruption, Platform, MoreData, CrashCount, SolutionID, R.BugID, [Area] from BucketToInt as BTI
  128. left join DrNames as D on D.iDriverName = BTI.iDriverName
  129. left join RaidBugs as R on BTI.BucketID = R.BucketID
  130. inner join dbgportal_BucketDatav3 as BD on BD.BucketID = BTI.BucketID
  131. where BTI.BucketID = @BucketID
  132. GO
  133. SET QUOTED_IDENTIFIER OFF
  134. GO
  135. SET ANSI_NULLS ON
  136. GO
  137. SET QUOTED_IDENTIFIER ON
  138. GO
  139. SET ANSI_NULLS OFF
  140. GO
  141. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketStatsByAlias Script Date: 2002-07-25 5:15:09 ******/
  142. CREATE PROCEDURE DBGPortal_GetBucketStatsByAlias (
  143. @Alias varchar(50)
  144. ) as
  145. declare @TotalCrashes int
  146. declare @AliasTotal int
  147. declare @SolvedCrashes int
  148. declare @RaidedCrashes int
  149. select @TotalCrashes = sum(crashCount) from dbgportal_bucketdatav3
  150. select @AliasTotal = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp = @alias
  151. select @SolvedCrashes = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp = @Alias and SolutionId is not null
  152. select @RaidedCrashes = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp = @Alias and bugID is not null and SolutionID is null
  153. if ( @SolvedCrashes is Null )
  154. set @SolvedCrashes = 0
  155. if( @RaidedCrashes is null )
  156. set @RaidedCrashes = 0
  157. select @TotalCrashes as Total, @AliasTotal as AliasTotal, @SolvedCrashes as Solved, @RaidedCrashes as Raided, (@AliasTotal - @RaidedCrashes - @SolvedCrashes) as Untouched
  158. GO
  159. SET QUOTED_IDENTIFIER OFF
  160. GO
  161. SET ANSI_NULLS ON
  162. GO
  163. SET QUOTED_IDENTIFIER ON
  164. GO
  165. SET ANSI_NULLS ON
  166. GO
  167. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketStatus Script Date: 2002-07-25 5:15:09 ******/
  168. CREATE PROCEDURE DBGPortal_GetBucketStatus (
  169. @BucketID varchar(100)
  170. ) AS
  171. --select TOP 1 MAX(ActionID) as BiggestComment, [Action], CommentBy from Comments WHERE BucketID = @BucketID and ActionID != 7 and ActionID != 11
  172. --group by [Action], CommentBy ORDER BY BiggestComment DESC
  173. if exists ( select * from comments where bucketID= @BucketID and ActionID = 8 )
  174. select top 1 ActionID as BiggestComment, [Action], CommentBy from comments where BucketID = @BucketID and ActionID= 8 order by entrydate desc
  175. else
  176. select top 1 ActionID as BiggestComment, [Action], CommentBy from comments where BucketID = @BucketID order by entrydate desc
  177. GO
  178. SET QUOTED_IDENTIFIER OFF
  179. GO
  180. SET ANSI_NULLS ON
  181. GO
  182. SET QUOTED_IDENTIFIER ON
  183. GO
  184. SET ANSI_NULLS OFF
  185. GO
  186. /****** Object: Stored Procedure dbo.DBGPortal_GetBucketsByAlias Script Date: 2002-07-25 5:15:10 ******/
  187. CREATE PROCEDURE DBGPortal_GetBucketsByAlias (
  188. @Alias varchar(50)
  189. ) AS
  190. select top 25 BucketID, CrashCount, BugID from dbgportal_bucketDatav3 where FollowUp = @Alias and SolutionID is null order by CrashCount desc
  191. GO
  192. SET QUOTED_IDENTIFIER OFF
  193. GO
  194. SET ANSI_NULLS ON
  195. GO
  196. SET QUOTED_IDENTIFIER OFF
  197. GO
  198. SET ANSI_NULLS ON
  199. GO
  200. /****** Object: Stored Procedure dbo.DBGPortal_GetCommentActions Script Date: 2002-07-25 5:15:10 ******/
  201. CREATE PROCEDURE DBGPortal_GetCommentActions AS
  202. SELECT * FROM CommentActions WHERE ActionID <= 5
  203. GO
  204. SET QUOTED_IDENTIFIER OFF
  205. GO
  206. SET ANSI_NULLS ON
  207. GO
  208. SET QUOTED_IDENTIFIER ON
  209. GO
  210. SET ANSI_NULLS OFF
  211. GO
  212. /****** Object: Stored Procedure dbo.DBGPortal_GetDeliveryTypes Script Date: 2002-07-25 5:15:10 ******/
  213. CREATE PROCEDURE DBGPortal_GetDeliveryTypes AS
  214. SELECT DeliveryType FROM Solutions3.DBO.DeliveryTypes
  215. GO
  216. SET QUOTED_IDENTIFIER OFF
  217. GO
  218. SET ANSI_NULLS ON
  219. GO
  220. SET QUOTED_IDENTIFIER OFF
  221. GO
  222. SET ANSI_NULLS OFF
  223. GO
  224. /****** Object: Stored Procedure dbo.DBGPortal_GetFollowUpIDs Script Date: 2002-07-25 5:15:10 ******/
  225. CREATE PROCEDURE DBGPortal_GetFollowUpIDs AS
  226. select FollowUp, iFollowUP from FollowUpids
  227. GO
  228. SET QUOTED_IDENTIFIER OFF
  229. GO
  230. SET ANSI_NULLS ON
  231. GO
  232. SET QUOTED_IDENTIFIER ON
  233. GO
  234. SET ANSI_NULLS OFF
  235. GO
  236. /****** Object: Stored Procedure dbo.DBGPortal_GetRaidedBuckets Script Date: 2002-07-25 5:15:10 ******/
  237. CREATE PROCEDURE DBGPortal_GetRaidedBuckets (
  238. @Page int
  239. ) AS
  240. select top 100 iIndex, BugID, CrashCount, FollowUP, BucketID from dbgportal_bucketdatav3 where SolutionID is null and BugId is not null and iIndex > @Page
  241. order by CrashCount desc
  242. GO
  243. SET QUOTED_IDENTIFIER OFF
  244. GO
  245. SET ANSI_NULLS ON
  246. GO
  247. SET QUOTED_IDENTIFIER ON
  248. GO
  249. SET ANSI_NULLS OFF
  250. GO
  251. /****** Object: Stored Procedure dbo.DBGPortal_GetResolvedBuckets Script Date: 2002-07-25 5:15:10 ******/
  252. CREATE PROCEDURE DBGPortal_GetResolvedBuckets (
  253. @Page int
  254. ) AS
  255. select top 100 iIndex, SolutionID, BugID, CrashCount, FollowUP, BucketID from dbgportal_bucketdatav3
  256. where SolutionID is not null and iIndex > @Page
  257. order by CrashCount desc
  258. GO
  259. SET QUOTED_IDENTIFIER OFF
  260. GO
  261. SET ANSI_NULLS ON
  262. GO
  263. SET QUOTED_IDENTIFIER OFF
  264. GO
  265. SET ANSI_NULLS OFF
  266. GO
  267. /****** Object: Stored Procedure dbo.DBGPortal_GetSolutionTypes Script Date: 2002-07-25 5:15:10 ******/
  268. CREATE PROCEDURE DBGPortal_GetSolutionTypes AS
  269. SELECT SolutionTypeName from Solutions3.DBO.SolutionTypes
  270. GO
  271. SET QUOTED_IDENTIFIER OFF
  272. GO
  273. SET ANSI_NULLS ON
  274. GO
  275. SET QUOTED_IDENTIFIER ON
  276. GO
  277. SET ANSI_NULLS OFF
  278. GO
  279. /****** Object: Stored Procedure dbo.DBGPortal_GetUnsolvedBuckets Script Date: 2002-07-25 5:15:10 ******/
  280. CREATE PROCEDURE DBGPortal_GetUnsolvedBuckets (
  281. @Page int
  282. ) AS
  283. select top 100 iIndex, SolutionID, BugID, CrashCount, FollowUP, BucketID from dbgportal_bucketdatav3 where SolutionID is null and iIndex > @Page
  284. GO
  285. SET QUOTED_IDENTIFIER OFF
  286. GO
  287. SET ANSI_NULLS ON
  288. GO
  289. SET QUOTED_IDENTIFIER OFF
  290. GO
  291. SET ANSI_NULLS ON
  292. GO
  293. /****** Object: Stored Procedure dbo.DBGPortal_SetBucketBugNumber Script Date: 2002-07-25 5:15:10 ******/
  294. CREATE PROCEDURE DBGPortal_SetBucketBugNumber (
  295. @BucketID varchar(100),
  296. @BugID int,
  297. @iBucket int,
  298. @Area varchar(30)
  299. ) AS
  300. IF EXISTS( SELECT iBucket FROM RaidBugs WHERE BucketID = @BucketID )
  301. UPDATE RaidBugs SET BugID=@BugID, Area=@Area WHERE BucketID = @BucketID
  302. ELSE
  303. INSERT INTO RaidBugs (iBucket, BugID, BucketID, Area ) VALUES ( @iBucket, @BugID, @BucketID, @Area )
  304. GO
  305. SET QUOTED_IDENTIFIER OFF
  306. GO
  307. SET ANSI_NULLS ON
  308. GO
  309. SET QUOTED_IDENTIFIER ON
  310. GO
  311. SET ANSI_NULLS OFF
  312. GO
  313. /****** Object: Stored Procedure dbo.DBGPortal_SetComment Script Date: 2002-07-25 5:15:10 ******/
  314. CREATE PROCEDURE DBGPortal_SetComment(
  315. @By varchar(20),
  316. -- @Action nvarchar(50),
  317. @Action int,
  318. @Comment nvarchar(1000),
  319. @BucketID varchar(100),
  320. @iBucket int
  321. ) AS
  322. DECLARE @ActionString nvarchar(50)
  323. IF ( @Action = 7 )
  324. UPDATE Comments SET ActionID = 6, Action=(SELECT [Action] FROM CommentActions WHERE ActionID = 6) WHERE BucketID=@BucketID and ActionID = 8
  325. if ( @Action = 9 )
  326. UPDATE Comments SET ActionID = 10, Action=(SELECT [Action] FROM CommentActions WHERE ActionID = 10) WHERE BucketID=@BucketID and ActionID = 8
  327. SELECT @ActionString = [Action] from CommentActions where ActionID = @Action
  328. INSERT INTO Comments ( EntryDate, CommentBy, [Action], Comment, BucketID, ActionID, iBucket ) VALUES ( GETDATE(), @By, @ActionString, @Comment, @BucketID, @Action, @iBucket )
  329. GO
  330. SET QUOTED_IDENTIFIER OFF
  331. GO
  332. SET ANSI_NULLS ON
  333. GO
  334. SET QUOTED_IDENTIFIER OFF
  335. GO
  336. SET ANSI_NULLS OFF
  337. GO
  338. /****** Object: Stored Procedure dbo.DBGPortal_SetPoolCorruption Script Date: 2002-07-25 5:15:10 ******/
  339. CREATE PROCEDURE DBGPortal_SetPoolCorruption(
  340. @BucketID varchar(100)
  341. ) AS
  342. UPDATE BucketToInt SET PoolCorruption = 1 WHERE BucketID = @BucketID
  343. GO
  344. SET QUOTED_IDENTIFIER OFF
  345. GO
  346. SET ANSI_NULLS ON
  347. GO
  348. SET QUOTED_IDENTIFIER ON
  349. GO
  350. SET ANSI_NULLS OFF
  351. GO
  352. /****** Object: Stored Procedure dbo.DBGPortal_UpdateStaticDataBugID Script Date: 2002-07-25 5:15:10 ******/
  353. CREATE PROCEDURE DBGPortal_UpdateStaticDataBugID (
  354. @BucketID varchar(100),
  355. @BugID int
  356. ) AS
  357. UPDATE DBGPortal_BucketDataV3 SET BugID = @BugID WHERE BucketID = @BucketID
  358. GO
  359. SET QUOTED_IDENTIFIER OFF
  360. GO
  361. SET ANSI_NULLS ON
  362. GO