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.

1188 lines
36 KiB

  1. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_BuildBucketDataTable]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  2. drop procedure [dbo].[DBGPortal_BuildBucketDataTable]
  3. GO
  4. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_BuildCrashDataTable]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  5. drop procedure [dbo].[DBGPortal_BuildCrashDataTable]
  6. GO
  7. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_ClearPoolCorruption]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  8. drop procedure [dbo].[DBGPortal_ClearPoolCorruption]
  9. GO
  10. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_CreateResponseRequest]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  11. drop procedure [dbo].[DBGPortal_CreateResponseRequest]
  12. GO
  13. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetAllBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  14. drop procedure [dbo].[DBGPortal_GetAllBuckets]
  15. GO
  16. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketComments]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  17. drop procedure [dbo].[DBGPortal_GetBucketComments]
  18. GO
  19. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketCrashes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  20. drop procedure [dbo].[DBGPortal_GetBucketCrashes]
  21. GO
  22. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketData]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  23. drop procedure [dbo].[DBGPortal_GetBucketData]
  24. GO
  25. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketStatsByAlias]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  26. drop procedure [dbo].[DBGPortal_GetBucketStatsByAlias]
  27. GO
  28. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  29. drop procedure [dbo].[DBGPortal_GetBucketStatus]
  30. GO
  31. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketsByAlias]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  32. drop procedure [dbo].[DBGPortal_GetBucketsByAlias]
  33. GO
  34. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketsByDriverName]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  35. drop procedure [dbo].[DBGPortal_GetBucketsByDriverName]
  36. GO
  37. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketsBySource]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  38. drop procedure [dbo].[DBGPortal_GetBucketsBySource]
  39. GO
  40. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetBucketsWithFullDump]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  41. drop procedure [dbo].[DBGPortal_GetBucketsWithFullDump]
  42. GO
  43. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetCommentActions]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  44. drop procedure [dbo].[DBGPortal_GetCommentActions]
  45. GO
  46. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetCrashCountByDate]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  47. drop procedure [dbo].[DBGPortal_GetCrashCountByDate]
  48. GO
  49. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetCustomQueries]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  50. drop procedure [dbo].[DBGPortal_GetCustomQueries]
  51. GO
  52. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetDeliveryTypes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  53. drop procedure [dbo].[DBGPortal_GetDeliveryTypes]
  54. GO
  55. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetDriverList]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  56. drop procedure [dbo].[DBGPortal_GetDriverList]
  57. GO
  58. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetFollowUpGroups]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  59. drop procedure [dbo].[DBGPortal_GetFollowUpGroups]
  60. GO
  61. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetFollowUpIDs]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  62. drop procedure [dbo].[DBGPortal_GetFollowUpIDs]
  63. GO
  64. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetGroupMembers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  65. drop procedure [dbo].[DBGPortal_GetGroupMembers]
  66. GO
  67. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetRaidedBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  68. drop procedure [dbo].[DBGPortal_GetRaidedBuckets]
  69. GO
  70. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetResolvedBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  71. drop procedure [dbo].[DBGPortal_GetResolvedBuckets]
  72. GO
  73. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetSP1Buckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  74. drop procedure [dbo].[DBGPortal_GetSP1Buckets]
  75. GO
  76. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetServerBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  77. drop procedure [dbo].[DBGPortal_GetServerBuckets]
  78. GO
  79. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetSolutionTypes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  80. drop procedure [dbo].[DBGPortal_GetSolutionTypes]
  81. GO
  82. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetUnResolvedResponseBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  83. drop procedure [dbo].[DBGPortal_GetUnResolvedResponseBuckets]
  84. GO
  85. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_GetUnsolvedBuckets]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  86. drop procedure [dbo].[DBGPortal_GetUnsolvedBuckets]
  87. GO
  88. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_IsAliasAFollowup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  89. drop procedure [dbo].[DBGPortal_IsAliasAFollowup]
  90. GO
  91. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SaveCustomQuery]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  92. drop procedure [dbo].[DBGPortal_SaveCustomQuery]
  93. GO
  94. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SetBucketBugNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  95. drop procedure [dbo].[DBGPortal_SetBucketBugNumber]
  96. GO
  97. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SetComment]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  98. drop procedure [dbo].[DBGPortal_SetComment]
  99. GO
  100. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_SetPoolCorruption]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  101. drop procedure [dbo].[DBGPortal_SetPoolCorruption]
  102. GO
  103. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_UpdateFullDumpStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  104. drop procedure [dbo].[DBGPortal_UpdateFullDumpStatus]
  105. GO
  106. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_UpdateStaticDataBugID]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  107. drop procedure [dbo].[DBGPortal_UpdateStaticDataBugID]
  108. GO
  109. SET QUOTED_IDENTIFIER ON
  110. GO
  111. SET ANSI_NULLS OFF
  112. GO
  113. CREATE PROCEDURE DBGPortal_BuildBucketDataTable AS
  114. /****** Object: Table [dbo].[DBGPortal_BucketDataV3] Script Date: 8/2/2002 01:23:12 PM ******/
  115. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_BucketDataV3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  116. drop table [dbo].[DBGPortal_BucketDataV3]
  117. /****** Object: Table [dbo].[DBGPortal_BucketDataV3] Script Date: 8/2/2002 01:23:15 PM ******/
  118. CREATE TABLE [dbo].[DBGPortal_BucketDataV3] (
  119. [bHasFullDump] [tinyint] NULL ,
  120. [iBucket] [int] NULL ,
  121. [iFollowUp] [int] NULL ,
  122. [SolutionID] [int] NULL ,
  123. [BugID] [int] NULL ,
  124. [CrashCount] [int] NULL ,
  125. [FollowUp] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  126. [BucketID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  127. [DriverName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  128. [iIndex] [int] IDENTITY (1, 1) NOT NULL
  129. ) ON [PRIMARY]
  130. CREATE CLUSTERED INDEX [IX_DBGPortal_BucketDataV3] ON [dbo].[DBGPortal_BucketDataV3]([CrashCount] DESC , [SolutionID] DESC , [BugID]) ON [PRIMARY]
  131. ALTER TABLE [dbo].[DBGPortal_BucketDataV3] WITH NOCHECK ADD
  132. CONSTRAINT [PK_DBGPortal_BucketDataV3] PRIMARY KEY NONCLUSTERED
  133. (
  134. [iIndex]
  135. ) ON [PRIMARY]
  136. CREATE INDEX [IX_DBGPortal_BucketDataV3_1] ON [dbo].[DBGPortal_BucketDataV3]([FollowUp]) ON [PRIMARY]
  137. CREATE INDEX [IX_DBGPortal_BucketDataV3_2] ON [dbo].[DBGPortal_BucketDataV3]([DriverName]) ON [PRIMARY]
  138. CREATE INDEX [IX_DBGPortal_BucketDataV3_3] ON [dbo].[DBGPortal_BucketDataV3]([BugID]) ON [PRIMARY]
  139. CREATE INDEX [IX_DBGPortal_BucketDataV3_4] ON [dbo].[DBGPortal_BucketDataV3]([BucketID]) ON [PRIMARY]
  140. CREATE INDEX [IX_DBGPortal_BucketDataV3_5] ON [dbo].[DBGPortal_BucketDataV3]([bHasFullDump]) ON [PRIMARY]
  141. Insert into dbgPortal_BucketDatav3 ( iBucket, iFollowUp, SolutionID, BugID, CrashCount, FollowUP, BucketID, DriverName )
  142. (select BTI.iBucket, BTI.iFollowUP, SolutionID, BugID, CrashCount, FollowUp, BTI.BucketID, D.DriverName from BucketToInt as BTI
  143. left join (
  144. SELECT TOP 100 PERCENT COUNT(sBucket) as CrashCount, sBucket FROM Crashinstances
  145. --where entrydate > '2002-07-12'
  146. GROUP BY sBucket
  147. ) as One on iBucket = sBucket
  148. left join Solutions3.dbo.SolvedBuckets as SB on SB.BucketID = BTI.BucketID
  149. left join RaidBugs as RB on RB.BucketID = BTI.BucketID
  150. left Join FollowUPIds as F on F.iFollowUp = BTI.iFollowUP
  151. left join DrNames as D on BTI.iDriverName = D.iDriverName )
  152. GO
  153. SET QUOTED_IDENTIFIER OFF
  154. GO
  155. SET ANSI_NULLS ON
  156. GO
  157. SET QUOTED_IDENTIFIER OFF
  158. GO
  159. SET ANSI_NULLS OFF
  160. GO
  161. CREATE PROCEDURE DBGPortal_BuildCrashDataTable
  162. AS
  163. /****** Object: Table [dbo].[DBGPortal_CrashDataV3] Script Date: 8/2/2002 12:50:38 PM ******/
  164. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBGPortal_CrashDataV3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  165. drop table [dbo].[DBGPortal_CrashDataV3]
  166. /****** Object: Table [dbo].[DBGPortal_CrashDataV3] Script Date: 8/2/2002 12:50:39 PM ******/
  167. CREATE TABLE [dbo].[DBGPortal_CrashDataV3] (
  168. [bViewed] [tinyint] NULL ,
  169. [bFullDump] [tinyint] NULL ,
  170. [SKU] [tinyint] NULL ,
  171. [Source] [tinyint] NULL ,
  172. [ItemIndex] [int] IDENTITY (1, 1) NOT NULL ,
  173. [BuildNo] [int] NULL ,
  174. [iBucket] [int] NULL ,
  175. [EntryDate] [datetime] NULL ,
  176. [Guid] [uniqueidentifier] NOT NULL ,
  177. [BucketID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  178. [FilePath] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  179. [Email] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  180. [Description] [nvarchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  181. ) ON [PRIMARY]
  182. CREATE CLUSTERED INDEX [IX_DBGPortal_CrashDataV3] ON [dbo].[DBGPortal_CrashDataV3]([BucketID]) ON [PRIMARY]
  183. CREATE INDEX [IX_DBGPortal_CrashDataV3_1] ON [dbo].[DBGPortal_CrashDataV3]([bFullDump] DESC ) ON [PRIMARY]
  184. CREATE INDEX [IX_DBGPortal_CrashDataV3_2] ON [dbo].[DBGPortal_CrashDataV3]([EntryDate] DESC ) ON [PRIMARY]
  185. CREATE INDEX [IX_DBGPortal_CrashDataV3_3] ON [dbo].[DBGPortal_CrashDataV3]([BuildNo] DESC ) ON [PRIMARY]
  186. CREATE INDEX [IX_DBGPortal_CrashDataV3_4] ON [dbo].[DBGPortal_CrashDataV3]([Source] DESC ) ON [PRIMARY]
  187. CREATE INDEX [IX_DBGPortal_CrashDataV3_5] ON [dbo].[DBGPortal_CrashDataV3]([Email] DESC ) ON [PRIMARY]
  188. CREATE INDEX [IX_DBGPortal_CrashDataV3_6] ON [dbo].[DBGPortal_CrashDataV3]([Guid] DESC ) ON [PRIMARY]
  189. insert into DBgPortal_CrashDataV3 ( bFullDump, SKU, Source, BuildNo, iBucket, EntryDate, [Description], BucketID, FilePath, email, GUID )
  190. select One.bFullDump, One.SKU, One.Source, One.BuildNo, One.sBucket as iBucket, One.EntryDate, [Description], One.BucketID, One.FilePath, Email, One.GUID from
  191. (
  192. select bFullDump, SKU, Source, BuildNo, CI.sBucket, EntryDate, BucketID, FilePath, CI.GUID from CrashInstances as CI
  193. left Join FilePath as FP on CI.GUID = FP.GUID
  194. left join BucketToInt as BTI on CI.sBucket = BTI.iBucket
  195. ) as One
  196. left join KaCustomer3.dbo.incident as I on one.GUID = I.GUID
  197. left join KaCustomer3.dbo.Customer as C on I.CustomerID = C.CustomerID
  198. GO
  199. SET QUOTED_IDENTIFIER OFF
  200. GO
  201. SET ANSI_NULLS ON
  202. GO
  203. SET QUOTED_IDENTIFIER OFF
  204. GO
  205. SET ANSI_NULLS OFF
  206. GO
  207. CREATE PROCEDURE DBGPortal_ClearPoolCorruption (
  208. @BucketID varchar(100)
  209. ) AS
  210. UPDATE BucketToInt SET PoolCorruption = NULL WHERE BucketID = @BucketID
  211. GO
  212. SET QUOTED_IDENTIFIER OFF
  213. GO
  214. SET ANSI_NULLS ON
  215. GO
  216. SET QUOTED_IDENTIFIER ON
  217. GO
  218. SET ANSI_NULLS OFF
  219. GO
  220. /****** Object: Stored Procedure dbo.DBGPortal_CreateResponseRequest Script Date: 2002-08-12 2:40:10 ******/
  221. CREATE PROCEDURE DBGPortal_CreateResponseRequest(
  222. @Status int,
  223. @Type int,
  224. @Alias varchar(50),
  225. @BucketID varchar(100),
  226. @Comment varchar(1024)
  227. ) AS
  228. INSERT INTO DBGPortal_ResponseQueue
  229. ( Status, ResponseType, DateRequested, RequestedBy, BucketID, Description )
  230. VALUES
  231. ( @Status, @Type, GetDate(), @Alias, @BucketID, @Comment )
  232. GO
  233. SET QUOTED_IDENTIFIER OFF
  234. GO
  235. SET ANSI_NULLS ON
  236. GO
  237. SET QUOTED_IDENTIFIER ON
  238. GO
  239. SET ANSI_NULLS OFF
  240. GO
  241. CREATE PROCEDURE DBGPortal_GetAllBuckets(
  242. @Page int= 0,
  243. @Alias varchar(100) = 'none',
  244. @Group int = 0
  245. ) AS
  246. IF ( @Alias <> 'none' and @Group = 0 )
  247. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex from dbgportal_bucketDatav3 where FollowUp = @Alias and iIndex > @Page order by CrashCount desc
  248. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  249. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex, FollowUp
  250. from dbgportal_bucketDatav3
  251. where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page
  252. order by CrashCount desc
  253. ELSE
  254. SELECT top 100 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page
  255. ORDER BY CrashCount DESC
  256. GO
  257. SET QUOTED_IDENTIFIER OFF
  258. GO
  259. SET ANSI_NULLS ON
  260. GO
  261. SET QUOTED_IDENTIFIER OFF
  262. GO
  263. SET ANSI_NULLS OFF
  264. GO
  265. CREATE PROCEDURE DBGPortal_GetBucketComments(
  266. @BucketID varchar(100)
  267. ) AS
  268. select EntryDate, CommentBy, Action, Comment from comments where BucketID = @BucketID order by entrydate desc
  269. GO
  270. SET QUOTED_IDENTIFIER OFF
  271. GO
  272. SET ANSI_NULLS ON
  273. GO
  274. SET QUOTED_IDENTIFIER ON
  275. GO
  276. SET ANSI_NULLS OFF
  277. GO
  278. CREATE PROCEDURE DBGPortal_GetBucketCrashes(
  279. @BucketID varchar(100)
  280. ) AS
  281. select top 300 bFullDump, SKU, BuildNo, Source, EntryDate, FilePath, Email from dbgportal_crashdatav3 where BucketID = @BucketID
  282. order by bFullDump desc,
  283. BuildNo desc,
  284. Source desc,
  285. Email desc,
  286. entrydate desc
  287. GO
  288. SET QUOTED_IDENTIFIER OFF
  289. GO
  290. SET ANSI_NULLS ON
  291. GO
  292. SET QUOTED_IDENTIFIER ON
  293. GO
  294. SET ANSI_NULLS OFF
  295. GO
  296. CREATE PROCEDURE DBGPortal_GetBucketData(
  297. @BucketID varchar(100)
  298. ) AS
  299. --select iBucket, FollowUp, BTI.iDriverName, DriverName, PoolCorruption, Platform, MoreData from BucketToInt as BTI
  300. --left join FollowUpids as F on f.iFollowUp = BTI.iFollowUp
  301. --left join DrNames as D on D.iDriverName = BTI.iDriverName
  302. --where BTI.BucketID = @BucketID
  303. select BTI.iBucket, FollowUp, BTI.iDriverName, BD.DriverName, PoolCorruption, Platform, MoreData, CrashCount, SolutionID, R.BugID, [Area] from BucketToInt as BTI
  304. left join DrNames as D on D.iDriverName = BTI.iDriverName
  305. left join RaidBugs as R on BTI.BucketID = R.BucketID
  306. inner join dbgportal_BucketDatav3 as BD on BD.BucketID = BTI.BucketID
  307. where BTI.BucketID = @BucketID
  308. GO
  309. SET QUOTED_IDENTIFIER OFF
  310. GO
  311. SET ANSI_NULLS ON
  312. GO
  313. SET QUOTED_IDENTIFIER ON
  314. GO
  315. SET ANSI_NULLS OFF
  316. GO
  317. CREATE PROCEDURE DBGPortal_GetBucketStatsByAlias (
  318. @Alias varchar(50) ,
  319. @GroupFlag int = 0
  320. ) as
  321. declare @TotalCrashes int
  322. declare @AliasTotal int
  323. declare @SolvedCrashes int
  324. declare @RaidedCrashes int
  325. IF ( @GroupFlag = 0 )
  326. BEGIN
  327. select @TotalCrashes = sum(crashCount) from dbgportal_bucketdatav3
  328. select @AliasTotal = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp = @alias
  329. select @SolvedCrashes = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp = @Alias and SolutionId is not null
  330. select @RaidedCrashes = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp = @Alias and bugID is not null and SolutionID is null
  331. if ( @SolvedCrashes is Null )
  332. set @SolvedCrashes = 0
  333. if( @RaidedCrashes is null )
  334. set @RaidedCrashes = 0
  335. END
  336. ELSE
  337. BEGIN
  338. select @TotalCrashes = sum(crashCount) from dbgportal_bucketdatav3
  339. select @AliasTotal = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) )
  340. select @SolvedCrashes = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and SolutionId is not null
  341. select @RaidedCrashes = sum(crashCount) from dbgportal_bucketdatav3 where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and bugID is not null and SolutionID is null
  342. if ( @SolvedCrashes is Null )
  343. set @SolvedCrashes = 0
  344. if( @RaidedCrashes is null )
  345. set @RaidedCrashes = 0
  346. END
  347. select @TotalCrashes as Total, @AliasTotal as AliasTotal, @SolvedCrashes as Solved, @RaidedCrashes as Raided, (@AliasTotal - @RaidedCrashes - @SolvedCrashes) as Untouched
  348. GO
  349. SET QUOTED_IDENTIFIER OFF
  350. GO
  351. SET ANSI_NULLS ON
  352. GO
  353. SET QUOTED_IDENTIFIER ON
  354. GO
  355. SET ANSI_NULLS ON
  356. GO
  357. CREATE PROCEDURE DBGPortal_GetBucketStatus (
  358. @BucketID varchar(100)
  359. ) AS
  360. --select TOP 1 MAX(ActionID) as BiggestComment, [Action], CommentBy from Comments WHERE BucketID = @BucketID and ActionID != 7 and ActionID != 11
  361. --group by [Action], CommentBy ORDER BY BiggestComment DESC
  362. if exists ( select * from comments where bucketID= @BucketID and ActionID = 8 )
  363. select top 1 ActionID as BiggestComment, [Action], CommentBy from comments where BucketID = @BucketID and ActionID= 8 order by entrydate desc
  364. else
  365. select top 1 ActionID as BiggestComment, [Action], CommentBy from comments where BucketID = @BucketID order by entrydate desc
  366. GO
  367. SET QUOTED_IDENTIFIER OFF
  368. GO
  369. SET ANSI_NULLS ON
  370. GO
  371. SET QUOTED_IDENTIFIER ON
  372. GO
  373. SET ANSI_NULLS OFF
  374. GO
  375. CREATE PROCEDURE DBGPortal_GetBucketsByAlias (
  376. @Page int= 0,
  377. @Alias varchar(100) = 'none',
  378. @Group int = 0
  379. ) AS
  380. SELECT top 25 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page AND FollowUp = @Alias
  381. order by crashcount desc
  382. --select top 25 BucketID, CrashCount, BugID from dbgportal_bucketDatav3 where FollowUp = @Alias and SolutionID is null order by CrashCount desc
  383. GO
  384. SET QUOTED_IDENTIFIER OFF
  385. GO
  386. SET ANSI_NULLS ON
  387. GO
  388. SET QUOTED_IDENTIFIER ON
  389. GO
  390. SET ANSI_NULLS OFF
  391. GO
  392. CREATE PROCEDURE DBGPortal_GetBucketsByDriverName(
  393. @Page int= 0,
  394. @DriverName varchar(100) = 'none',
  395. @Group int = 0
  396. ) AS
  397. --IF ( @Alias <> 'none' )
  398. -- select top 25 BucketID, CrashCount, BugID from dbgportal_bucketDatav3 where FollowUp = @Alias and SolutionID is null and BugID is not null order by CrashCount desc
  399. --ELSE
  400. SELECT top 100 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page and DriverName = @DriverName
  401. ORDER BY CrashCount DESC
  402. GO
  403. SET QUOTED_IDENTIFIER OFF
  404. GO
  405. SET ANSI_NULLS ON
  406. GO
  407. SET QUOTED_IDENTIFIER ON
  408. GO
  409. SET ANSI_NULLS OFF
  410. GO
  411. CREATE PROCEDURE DBGPortal_GetBucketsBySource(
  412. @Page int= 0,
  413. @Alias varchar(100) = 'none',
  414. @Group int = 0,
  415. @Source int = 6
  416. ) AS
  417. IF ( @Alias <> 'none' and @Group = 0 )
  418. SELECT TOP 100 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  419. INNER JOIN (SELECT DISTINCT(BucketID) FROM DBGPortal_CrashDataV3 WHERE Source=@Source) as One
  420. ON One.BucketID = BD.BucketID
  421. WHERE iIndex > @Page AND FollowUp = @Alias
  422. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  423. SELECT TOP 100 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  424. INNER JOIN (SELECT DISTINCT(BucketID) FROM DBGPortal_CrashDataV3 WHERE Source=@Source) as One
  425. ON One.BucketID = BD.BucketID
  426. WHERE iIndex > @Page AND FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) )
  427. ELSE
  428. SELECT TOP 100 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  429. INNER JOIN (SELECT DISTINCT(BucketID) FROM DBGPortal_CrashDataV3 WHERE Source=@Source) as One
  430. ON One.BucketID = BD.BucketID
  431. WHERE iIndex > @Page
  432. GO
  433. SET QUOTED_IDENTIFIER OFF
  434. GO
  435. SET ANSI_NULLS ON
  436. GO
  437. SET QUOTED_IDENTIFIER ON
  438. GO
  439. SET ANSI_NULLS OFF
  440. GO
  441. CREATE PROCEDURE DBGPortal_GetBucketsWithFullDump(
  442. @Page int = 0,
  443. @Alias varchar(100) = 'none',
  444. @Group int = 0
  445. ) AS
  446. IF ( @Alias <> 'none' and @Group = 0 )
  447. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex from dbgportal_bucketDatav3 where FollowUp = @Alias and iIndex > @Page and bHasFullDump = 1 order by CrashCount desc
  448. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  449. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex, FollowUp
  450. from dbgportal_bucketDatav3
  451. where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page and bHasFullDump = 1
  452. order by CrashCount desc
  453. ELSE
  454. SELECT top 100 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page and bHasFullDump = 1
  455. ORDER BY CrashCount DESC
  456. GO
  457. SET QUOTED_IDENTIFIER OFF
  458. GO
  459. SET ANSI_NULLS ON
  460. GO
  461. SET QUOTED_IDENTIFIER OFF
  462. GO
  463. SET ANSI_NULLS ON
  464. GO
  465. CREATE PROCEDURE DBGPortal_GetCommentActions AS
  466. SELECT * FROM CommentActions WHERE ActionID <= 5
  467. GO
  468. SET QUOTED_IDENTIFIER OFF
  469. GO
  470. SET ANSI_NULLS ON
  471. GO
  472. SET QUOTED_IDENTIFIER OFF
  473. GO
  474. SET ANSI_NULLS OFF
  475. GO
  476. CREATE PROCEDURE DBGPortal_GetCrashCountByDate(
  477. @StartDate datetime,
  478. @EndDate datetime,
  479. @BucketID varchar(100)
  480. ) AS
  481. select count(*) as CrashCount from dbgportal_CrashDatav3 where EntryDate >= @StartDate and EntryDate < @EndDate and BucketID = @BucketID
  482. GO
  483. SET QUOTED_IDENTIFIER OFF
  484. GO
  485. SET ANSI_NULLS ON
  486. GO
  487. SET QUOTED_IDENTIFIER ON
  488. GO
  489. SET ANSI_NULLS OFF
  490. GO
  491. CREATE PROCEDURE DBGPortal_GetCustomQueries(
  492. @Alias varchar(15)
  493. ) AS
  494. SELECT AliasID, CustomQueryDesc, CustomQuery FROM DBGPortal_AliasData WHERE Alias = @Alias
  495. GO
  496. SET QUOTED_IDENTIFIER OFF
  497. GO
  498. SET ANSI_NULLS ON
  499. GO
  500. SET QUOTED_IDENTIFIER ON
  501. GO
  502. SET ANSI_NULLS OFF
  503. GO
  504. CREATE PROCEDURE DBGPortal_GetDeliveryTypes AS
  505. SELECT DeliveryType FROM Solutions3.DBO.DeliveryTypes
  506. GO
  507. SET QUOTED_IDENTIFIER OFF
  508. GO
  509. SET ANSI_NULLS ON
  510. GO
  511. SET QUOTED_IDENTIFIER ON
  512. GO
  513. SET ANSI_NULLS OFF
  514. GO
  515. CREATE PROCEDURE DBGPortal_GetDriverList(
  516. @Page varchar(100),
  517. @Alias varchar(100) = 'none',
  518. @Group int = 0
  519. ) AS
  520. IF ( @Alias <> 'none' and @Group = 0 )
  521. BEGIN
  522. SELECT TOP 25 One.DriverName, One.DriverName as iIndex, Sum(CrashCount) as CrashCount from DBGPortal_BucketDataV3 as BD
  523. inner join ( select distinct(DriverName) from DBGPortal_BucketDatav3 where DriverName is not null and FollowUp = @Alias ) as one
  524. on one.DriverName = BD.DriverName
  525. Where CrashCount is not null and One.DriverName > @Page
  526. group by One.DriverName
  527. order by One.DriverName
  528. END
  529. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  530. SELECT TOP 25 One.DriverName, One.DriverName as iIndex, Sum(CrashCount) as CrashCount from DBGPortal_BucketDataV3 as BD
  531. inner join ( select distinct(DriverName) from DBGPortal_BucketDatav3 where DriverName is not null and FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) )) as one
  532. on one.DriverName = BD.DriverName
  533. Where CrashCount is not null and One.DriverName > @Page
  534. group by One.DriverName
  535. ORDER BY One.DriverName
  536. ELSE
  537. BEGIN
  538. SELECT TOP 100 One.DriverName, One.DriverName as iIndex, Sum(CrashCount) as CrashCount from DBGPortal_BucketDataV3 as BD
  539. inner join ( select distinct(DriverName) from DBGPortal_BucketDatav3 where DriverName is not null ) as one
  540. on one.DriverName = BD.DriverName
  541. Where CrashCount is not null and One.DriverName > @Page
  542. group by One.DriverName
  543. ORDER BY One.DriverName
  544. END
  545. GO
  546. SET QUOTED_IDENTIFIER OFF
  547. GO
  548. SET ANSI_NULLS ON
  549. GO
  550. SET QUOTED_IDENTIFIER ON
  551. GO
  552. SET ANSI_NULLS OFF
  553. GO
  554. CREATE PROCEDURE DBGPortal_GetFollowUpGroups AS
  555. SELECT iGroup, GroupName from FollowUpGroup
  556. GO
  557. SET QUOTED_IDENTIFIER OFF
  558. GO
  559. SET ANSI_NULLS ON
  560. GO
  561. SET QUOTED_IDENTIFIER OFF
  562. GO
  563. SET ANSI_NULLS OFF
  564. GO
  565. CREATE PROCEDURE DBGPortal_GetFollowUpIDs AS
  566. select FollowUp, iFollowUP from FollowUpids
  567. GO
  568. SET QUOTED_IDENTIFIER OFF
  569. GO
  570. SET ANSI_NULLS ON
  571. GO
  572. SET QUOTED_IDENTIFIER ON
  573. GO
  574. SET ANSI_NULLS OFF
  575. GO
  576. CREATE PROCEDURE DBGPortal_GetGroupMembers(
  577. @iGroup int
  578. ) AS
  579. SELECT FollowUp FROM FollowUpIds WHERE iGroup = @iGroup
  580. GO
  581. SET QUOTED_IDENTIFIER OFF
  582. GO
  583. SET ANSI_NULLS ON
  584. GO
  585. SET QUOTED_IDENTIFIER OFF
  586. GO
  587. SET ANSI_NULLS OFF
  588. GO
  589. CREATE PROCEDURE DBGPortal_GetRaidedBuckets(
  590. @Page int= 0,
  591. @Alias varchar(100) = 'none',
  592. @Group int = 0
  593. ) AS
  594. IF ( @Alias <> 'none' and @Group = 0 )
  595. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex from dbgportal_bucketDatav3 where FollowUp = @Alias and iIndex > @Page and SolutionID is null and BugId is not null order by CrashCount desc
  596. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  597. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex, FollowUp
  598. from dbgportal_bucketDatav3
  599. where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page AND SolutionID is null and BugId is not null
  600. order by CrashCount desc
  601. ELSE
  602. SELECT top 100 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page and BugID is not null and SolutionID is null
  603. ORDER BY CrashCount DESC
  604. GO
  605. SET QUOTED_IDENTIFIER OFF
  606. GO
  607. SET ANSI_NULLS ON
  608. GO
  609. SET QUOTED_IDENTIFIER ON
  610. GO
  611. SET ANSI_NULLS OFF
  612. GO
  613. CREATE PROCEDURE DBGPortal_GetResolvedBuckets(
  614. @Page int= 0,
  615. @Alias varchar(100) = 'none',
  616. @Group int = 0
  617. ) AS
  618. IF ( @Alias <> 'none' and @Group = 0 )
  619. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex from dbgportal_bucketDatav3 where FollowUp = @Alias and iIndex > @Page and SolutionID is not null order by CrashCount desc
  620. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  621. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex, FollowUp
  622. from dbgportal_bucketDatav3
  623. where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page and SolutionID is not null
  624. order by CrashCount desc
  625. ELSE
  626. SELECT top 100 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page and SolutionID is not null
  627. ORDER BY CrashCount DESC
  628. GO
  629. SET QUOTED_IDENTIFIER OFF
  630. GO
  631. SET ANSI_NULLS ON
  632. GO
  633. SET QUOTED_IDENTIFIER OFF
  634. GO
  635. SET ANSI_NULLS OFF
  636. GO
  637. CREATE PROCEDURE DBGPortal_GetSP1Buckets(
  638. @Page int= 0,
  639. @Alias varchar(100) = 'none',
  640. @Group int = 0
  641. ) AS
  642. IF ( @Alias <> 'none' and @Group = 0 )
  643. SELECT TOP 25 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  644. INNER JOIN (SELECT DISTINCT(BucketID) FROM dbgPortal_CrashDatav3 WHERE BuildNo > 26000001 AND BuildNo < 26009999) as One
  645. ON One.BucketID = BD.BucketID
  646. WHERE iIndex > @Page and FollowUp = @Alias
  647. ORDER BY CrashCount desc
  648. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  649. SELECT TOP 25 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  650. INNER JOIN (SELECT DISTINCT(BucketID) FROM dbgPortal_CrashDatav3 WHERE BuildNo > 26000001 AND BuildNo < 26009999) as One
  651. ON One.BucketID = BD.BucketID
  652. WHERE FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page
  653. ORDER BY CrashCount desc
  654. ELSE
  655. SELECT TOP 100 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  656. INNER JOIN (SELECT DISTINCT(BucketID) FROM dbgPortal_CrashDatav3 WHERE BuildNo > 26000001 AND BuildNo < 26009999) as One
  657. ON One.BucketID = BD.BucketID
  658. WHERE iIndex > @Page
  659. ORDER BY CrashCount desc
  660. GO
  661. SET QUOTED_IDENTIFIER OFF
  662. GO
  663. SET ANSI_NULLS ON
  664. GO
  665. SET QUOTED_IDENTIFIER ON
  666. GO
  667. SET ANSI_NULLS OFF
  668. GO
  669. CREATE PROCEDURE DBGPortal_GetServerBuckets(
  670. @Page int= 0,
  671. @Alias varchar(100) = 'none',
  672. @Group int = 0
  673. ) AS
  674. IF ( @Alias <> 'none' and @Group = 0 )
  675. SELECT TOP 25 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  676. INNER JOIN (SELECT DISTINCT(BucketID) FROM dbgPortal_CrashDatav3 WHERE BuildNo > 36630000 AND BuildNo < 37000000) as One
  677. ON One.BucketID = BD.BucketID
  678. WHERE iIndex > @Page and FollowUp = @Alias
  679. ORDER BY CrashCount desc
  680. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  681. SELECT TOP 25 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  682. INNER JOIN (SELECT DISTINCT(BucketID) FROM dbgPortal_CrashDatav3 WHERE BuildNo > 36630000 AND BuildNo < 37000000) as One
  683. ON One.BucketID = BD.BucketID
  684. WHERE FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page
  685. ORDER BY CrashCount desc
  686. ELSE
  687. SELECT TOP 100 bHasFullDump, iIndex, BD.BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM dbgportal_bucketdatav3 as BD
  688. INNER JOIN (SELECT DISTINCT(BucketID) FROM dbgPortal_CrashDatav3 WHERE BuildNo > 36630000 AND BuildNo < 37000000) as One
  689. ON One.BucketID = BD.BucketID
  690. WHERE iIndex > @Page
  691. ORDER BY CrashCount desc
  692. GO
  693. SET QUOTED_IDENTIFIER OFF
  694. GO
  695. SET ANSI_NULLS ON
  696. GO
  697. SET QUOTED_IDENTIFIER OFF
  698. GO
  699. SET ANSI_NULLS OFF
  700. GO
  701. CREATE PROCEDURE DBGPortal_GetSolutionTypes AS
  702. SELECT SolutionTypeName from Solutions3.DBO.SolutionTypes
  703. GO
  704. SET QUOTED_IDENTIFIER OFF
  705. GO
  706. SET ANSI_NULLS ON
  707. GO
  708. SET QUOTED_IDENTIFIER ON
  709. GO
  710. SET ANSI_NULLS OFF
  711. GO
  712. CREATE PROCEDURE DBGPortal_GetUnResolvedResponseBuckets (
  713. @Page int= 0,
  714. @Alias varchar(100) = 'none',
  715. @Group int = 0
  716. ) AS
  717. IF ( @Alias <> 'none' and @Group = 0 )
  718. SELECT bHasFullDump, iIndex, BD.BucketID, CrashCount, S.SolutionID, BugID, FollowUP, DriverName FROM solutions3.dbo.solvedbuckets as S
  719. INNER JOIN dbgportal_bucketdatav3 as BD on BD.BucketID = S.BucketID
  720. WHERE SolutionType = 0 and iIndex > @Page AND FollowUp = @Alias
  721. ORDER BY CrashCount desc
  722. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  723. SELECT bHasFullDump, iIndex, BD.BucketID, CrashCount, S.SolutionID, BugID, FollowUP, DriverName FROM solutions3.dbo.solvedbuckets as S
  724. INNER JOIN dbgportal_bucketdatav3 as BD on BD.BucketID = S.BucketID
  725. WHERE SolutionType = 0 and iIndex > @Page AND FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) )
  726. ORDER BY CrashCount desc
  727. ELSE
  728. SELECT bHasFullDump, iIndex, BD.BucketID, CrashCount, S.SolutionID, BugID, FollowUP, DriverName FROM solutions3.dbo.solvedbuckets as S
  729. INNER JOIN dbgportal_bucketdatav3 as BD on BD.BucketID = S.BucketID
  730. WHERE SolutionType = 0 and iIndex > @Page
  731. ORDER BY CrashCount desc
  732. GO
  733. SET QUOTED_IDENTIFIER OFF
  734. GO
  735. SET ANSI_NULLS ON
  736. GO
  737. SET QUOTED_IDENTIFIER ON
  738. GO
  739. SET ANSI_NULLS OFF
  740. GO
  741. CREATE PROCEDURE DBGPortal_GetUnsolvedBuckets(
  742. @Page int= 0,
  743. @Alias varchar(100) = 'none',
  744. @Group int = 0
  745. ) AS
  746. IF ( @Alias <> 'none' and @Group = 0 )
  747. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex from dbgportal_bucketDatav3 where FollowUp = @Alias and SolutionID is null and iIndex > @Page order by CrashCount desc
  748. ELSE IF ( @Alias <> 'none' and @Group > 0 )
  749. select top 25 bHasFullDump, BucketID, CrashCount, SolutionID, BugID, DriverName, iIndex, FollowUp
  750. from dbgportal_bucketDatav3
  751. where FollowUp in ( SELECT FollowUP FROM FollowUpIds WHERE iGroup = (select iGroup from followupgroup WHERE GroupName = @Alias ) ) and iIndex > @Page and SolutionID is null
  752. order by CrashCount desc
  753. ELSE
  754. SELECT top 100 bHasFullDump, iIndex, BucketID, CrashCount, SolutionID, BugID, FollowUP, DriverName FROM DBGPortal_BucketDataV3 Where iIndex > @Page and SolutionID is null
  755. ORDER BY CrashCount DESC
  756. GO
  757. SET QUOTED_IDENTIFIER OFF
  758. GO
  759. SET ANSI_NULLS ON
  760. GO
  761. SET QUOTED_IDENTIFIER OFF
  762. GO
  763. SET ANSI_NULLS OFF
  764. GO
  765. CREATE PROCEDURE DBGPortal_IsAliasAFollowup(
  766. @Alias varchar(50)
  767. ) AS
  768. SELECT iFollowup FROM FollowUpIDs WHERE FollowUp = @Alias
  769. GO
  770. SET QUOTED_IDENTIFIER OFF
  771. GO
  772. SET ANSI_NULLS ON
  773. GO
  774. SET QUOTED_IDENTIFIER OFF
  775. GO
  776. SET ANSI_NULLS OFF
  777. GO
  778. CREATE PROCEDURE DBGPortal_SaveCustomQuery(
  779. @Alias varchar(15),
  780. @CustomQueryDesc varchar(50),
  781. @CustomQuery varchar(1000)
  782. ) AS
  783. IF NOT EXISTS( SELECT * FROM DBGPortal_AliasData where Alias = @Alias and CustomQueryDesc = @CustomQueryDesc and CustomQuery = @CustomQuery )
  784. BEGIN
  785. INSERT INTO DBGPortal_AliasData ( Alias, CustomQueryDesc, CustomQuery ) VALUES ( @Alias, @CustomQueryDesc, @CustomQuery )
  786. SELECT @@Identity as QueryID
  787. END
  788. ELSE
  789. SELECT 0 AS QueryID
  790. GO
  791. SET QUOTED_IDENTIFIER OFF
  792. GO
  793. SET ANSI_NULLS ON
  794. GO
  795. SET QUOTED_IDENTIFIER OFF
  796. GO
  797. SET ANSI_NULLS ON
  798. GO
  799. CREATE PROCEDURE DBGPortal_SetBucketBugNumber (
  800. @BucketID varchar(100),
  801. @BugID int,
  802. @iBucket int,
  803. @Area varchar(30)
  804. ) AS
  805. IF EXISTS( SELECT iBucket FROM RaidBugs WHERE BucketID = @BucketID )
  806. UPDATE RaidBugs SET BugID=@BugID, Area=@Area WHERE BucketID = @BucketID
  807. ELSE
  808. INSERT INTO RaidBugs (iBucket, BugID, BucketID, Area ) VALUES ( @iBucket, @BugID, @BucketID, @Area )
  809. GO
  810. SET QUOTED_IDENTIFIER OFF
  811. GO
  812. SET ANSI_NULLS ON
  813. GO
  814. SET QUOTED_IDENTIFIER ON
  815. GO
  816. SET ANSI_NULLS OFF
  817. GO
  818. CREATE PROCEDURE DBGPortal_SetComment(
  819. @By varchar(20),
  820. -- @Action nvarchar(50),
  821. @Action int,
  822. @Comment nvarchar(1000),
  823. @BucketID varchar(100),
  824. @iBucket int
  825. ) AS
  826. DECLARE @ActionString nvarchar(50)
  827. IF ( @Action = 7 )
  828. UPDATE Comments SET ActionID = 6, Action=(SELECT [Action] FROM CommentActions WHERE ActionID = 6) WHERE BucketID=@BucketID and ActionID = 8
  829. if ( @Action = 9 )
  830. UPDATE Comments SET ActionID = 10, Action=(SELECT [Action] FROM CommentActions WHERE ActionID = 10) WHERE BucketID=@BucketID and ActionID = 8
  831. SELECT @ActionString = [Action] from CommentActions where ActionID = @Action
  832. INSERT INTO Comments ( EntryDate, CommentBy, [Action], Comment, BucketID, ActionID, iBucket ) VALUES ( GETDATE(), @By, @ActionString, @Comment, @BucketID, @Action, @iBucket )
  833. GO
  834. SET QUOTED_IDENTIFIER OFF
  835. GO
  836. SET ANSI_NULLS ON
  837. GO
  838. SET QUOTED_IDENTIFIER OFF
  839. GO
  840. SET ANSI_NULLS OFF
  841. GO
  842. CREATE PROCEDURE DBGPortal_SetPoolCorruption(
  843. @BucketID varchar(100)
  844. ) AS
  845. UPDATE BucketToInt SET PoolCorruption = 1 WHERE BucketID = @BucketID
  846. GO
  847. SET QUOTED_IDENTIFIER OFF
  848. GO
  849. SET ANSI_NULLS ON
  850. GO
  851. SET QUOTED_IDENTIFIER ON
  852. GO
  853. SET ANSI_NULLS OFF
  854. GO
  855. CREATE PROCEDURE DBGPortal_UpdateFullDumpStatus
  856. AS
  857. update DBGPortal_BucketDataV3 set bHasFullDump = 1 where BucketID in
  858. ( select Distinct(BucketID) from dbgportal_crashdatav3 where bFullDump=1 )
  859. GO
  860. SET QUOTED_IDENTIFIER OFF
  861. GO
  862. SET ANSI_NULLS ON
  863. GO
  864. SET QUOTED_IDENTIFIER ON
  865. GO
  866. SET ANSI_NULLS OFF
  867. GO
  868. CREATE PROCEDURE DBGPortal_UpdateStaticDataBugID (
  869. @BucketID varchar(100),
  870. @BugID int
  871. ) AS
  872. UPDATE DBGPortal_BucketDataV3 SET BugID = @BugID WHERE BucketID = @BucketID
  873. GO
  874. SET QUOTED_IDENTIFIER OFF
  875. GO
  876. SET ANSI_NULLS ON
  877. GO