Exam4Training

Which five Transact-SQL segments should you use to develop the solution?

DRAG DROP

You are the database administrator for a Microsoft SQL Server instance. You develop an Extended Events package to look for events related to application performance. You need to change the event session to include SQL Server errors that are greater than error severity 15.

Which five Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the correct order.

Answer:

Explanation:

Example: To start An Extended Events sessions in order to trap SQL Server errors with severity greater than 10, just run the following script:

CREATE EVENT SESSION [error_trap] ON SERVER

ADD EVENT sqlserver.error_reported

(

ACTION

(package0.collect_system_time,package0.last_error,sqlserver.client_app_name,sqlserver.client_hostname,sql server.database_id,sqlserver.database_name,sqlserver.nt_username, sqlserver.plan_handle,sqlserver.query_hash,sqlserver.session_id,sqlserver.sql_text,sqlserver.tsql_frame,sqlse rver.tsql_stack,sqlserver.username)

WHERE ([severity]>10)

)

ADD TARGET package0.event_file

(

SET filename=N’D:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLXEvents

error_trap.xel’

)

WITH

(

STARTUP_STATE=OFF

)

GO

References: http://sqlblog.com/blogs/davide_mauri/archive/2013/03/17/trapping-sql-server-errors-withextended-

events.aspx

Latest 70-764 Dumps Valid Version with 451 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version