I had a following error when I start event session>
The target, "CE79811F-1A80-40E1-8F5D-7445A3F375E7.package0.asynchronous_file_target", encountered a configuration error during initialization. Object cannot be added to the event session.
Im using this code...
use tempdb
goexec sp_configure 'show advanced options',1reconfigureexec sp_configure 'xp_cmdshell',1reconfigure
goBEGIN TRYdrop event session session_waits on serverEND TRY BEGIN CATCH END CATCH
goexec xp_cmdshell 'del c:\wait_stats*.xel', no_output;exec xp_cmdshell 'del c:\wait_stats*.xem', no_output;
gocreate event session session_waits on serveradd event sqlos.wait_info(WHERE sqlserver.session_id=61and duration>0),add event sqlos.wait_info_external(WHERE sqlserver.session_id=61and duration>0)add target package0.asynchronous_file_target(SET filename=N'c:\wait_stats.xel', metadatafile=N'c:\wait_stats.xem');
go
all of this code completed successfully and when I execute following code, It throw me this error...
alter event session session_waits on server state =start;
go
How can I fix this error? The target, "CE79811F-1A80-40E1-8F5D-7445A3F375E7.package0.asynchronous_file_target", encountered a configuration error during initialization. Object cannot be added to the event session.
Thx.