1
0
Эх сурвалжийг харах

Merge pull request #45 from DiHo78/patch-1

data type change in spLoadSchedulerMonitor to avoid arithmethic overflow error.
Parikshit 8 жил өмнө
parent
commit
269aa5db3e

+ 2 - 4
SQL-Performance-Baseline/CreateSystemhealthDBAndSchema.sql

@@ -1,4 +1,4 @@
-/**************************
+/**************************
  This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code.
  Author: Denzil Ribeiro
  Date: Jan 6, 2013
@@ -562,7 +562,7 @@ drop table tbl_scheduler_monitor
 select 
 			c1.value('(./event/@timestamp)[1]', 'datetime') as UTCtimestamp,
 			DATEADD(mi,@UTDDateDiff,c1.value('(./event/@timestamp)[1]', 'datetime')) as [timestamp],
-			c1.value('(./event/data[@name="id"])[1]', 'int') as [id],
+			c1.value('(./event/data[@name="id"])[1]', 'bigint') as [id],
 			c1.value('(./event/data[@name="process_utilization"])[1]', 'int') as process_utilization,
 			c1.value('(./event/data[@name="system_idle"])[1]', 'int') as system_idle,
 			c1.value('(./event/data[@name="user_mode_time"])[1]', 'bigint') as user_mode_time,
@@ -774,5 +774,3 @@ select 'Process System Health XEL files from a UNC' as ImportMethod, 'exec spLoa
 exec spLoadSystemHealthSession @path_to_health_session='D:\XELFiles\system_health*.xel',@UTDDateDiff=-6
 Exec spLoadSystemHealthSession
 */
-
-

+ 12 - 0
SQL-Performance-Baseline/README.md

@@ -29,3 +29,15 @@ You can follow the steps mentioned below  to set it up in your environment.
 1.	Deploy the SSRS Reports & see if data populates in the reports.
 
 _DISCLAIMER_: © 2016 Microsoft Corporation. All rights reserved. Sample scripts in this guide are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
+
+### Change Notes
+
+Date: 2017/05/12
+Author: Dirk Hondong
+Affected script: CreateSystemhealthDBandSchema.sql
+Affected proc: dbo.spLoadSchedulerMonitor
+Change: data type change from int to bigint 
+c1.value('(./event/data[@name="id"])[1]', 'int') as [id]  
+to 
+c1.value('(./event/data[@name="id"])[1]', 'bigint') as [id]
+to avoid overflow error