方法一:SQL2008R2:SELECTXEventData.XEvent.value(@timestamp,datetime2(3)),cast(XEventData.XEvent.value((data/value)[1],varchar(max))asxml)FROM(SELECTCAST(target_dataASXML)ASTargetDataFROMsys.dm_xe_session_targetsstJOINsys.dm_xe_sessionssONs.address=st.event_session_addressWHERE[name]=system_healthANDst.target_name=Nring_buffer)ASDataCROSSAPPLYTargetData.nodes(//RingBufferTarget/event)ASXEventDa...