Increase the number and the size for system_health xel files from SSMS or during setup - by Christophe LAPORTE - SQL Server MVP-MCM

Status : 

 


8
0
Sign in
to vote
ID 3138565 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 8/1/2017 7:01:30 AM
Access Restriction Public

Description

Using system_health xel file sis very handy when troubleshooting issues. But The number and the size of the files has to be changed during post-installation scripts to be really efficient. Most of the instances are configured with default values. There is not enough retention.

Actually we need to run some scripts like  :

ALTER EVENT SESSION [system_health]  
ON SERVER STATE = STOP 
GO 

ALTER EVENT SESSION [system_health]  
ON SERVER DROP TARGET package0.event_file  
ALTER EVENT SESSION [system_health]  
ON SERVER ADD TARGET package0.event_file  
    (SET FILENAME=N'system_health.xel',
    max_file_size=(25), 
    max_rollover_files=(20)) 
GO 



ALTER EVENT SESSION [system_health]  
ON SERVER STATE = START 
GO
Sign in to post a comment.