Browse Source

data ytpe change in spLoadSchedulerMonitor

Change of  c1.value('(./event/data[@name="id"])[1]', 'int') as id,  to c1.value('(./event/data[@name="id"])[1]', 'bigint') as id,
to avoid Overflow errors
Dirk Hondong 8 years ago
parent
commit
1c7c614cb1
1 changed files with 2 additions and 4 deletions
  1. 2 4
      SQL-Performance-Baseline/CreateSystemhealthDBAndSchema.sql

+ 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
 */
-
-