{"id":506,"date":"2025-07-24T16:20:40","date_gmt":"2025-07-24T07:20:40","guid":{"rendered":"https:\/\/sejiwon.com\/?p=506"},"modified":"2025-07-25T09:40:20","modified_gmt":"2025-07-25T00:40:20","slug":"sys-dm_xe_session_targets-%ec%84%b8%eb%b6%80","status":"publish","type":"post","link":"https:\/\/sejiwon.com\/?p=506","title":{"rendered":"sys.dm_xe_session_targets \uc138\ubd80"},"content":{"rendered":"\n<p><code>sys.dm_xe_session_targets<\/code>&nbsp;\ubdf0\ub294 SQL Server\uc758&nbsp;<strong>Extended Events (\ud655\uc7a5 \uc774\ubca4\ud2b8)<\/strong>&nbsp;\uae30\ub2a5\uc5d0\uc11c \uc0ac\uc6a9 \uc911\uc778&nbsp;<strong>\ud0c0\uac9f(target)<\/strong>&nbsp;\uc5d0 \ub300\ud55c \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774 DMV\ub294 \uc2e4\ud589 \uc911\uc778 XE \uc138\uc158\uc758&nbsp;<strong>\ud0c0\uac9f \uad6c\uc131\uacfc \uc0c1\ud0dc<\/strong>\ub97c \uc2e4\uc2dc\uac04\uc73c\ub85c \ubaa8\ub2c8\ud130\ub9c1\ud560 \ub54c \uc720\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udccc \uac1c\ub150 \uc694\uc57d<\/h3>\n\n\n\n<ul>\n<li><strong>\ud655\uc7a5 \uc774\ubca4\ud2b8 \ud0c0\uac9f(Target)<\/strong>: \uc774\ubca4\ud2b8 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uac70\ub098 \ucc98\ub9ac\ud558\ub294 \uc704\uce58 (\uc608: \uba54\ubaa8\ub9ac, \ud30c\uc77c \ub4f1).<\/li>\n\n\n\n<li><code>sys.dm_xe_session_targets<\/code>: \ud604\uc7ac \uc2e4\ud589 \uc911\uc778 \uc138\uc158\uc5d0 \uc5f0\uacb0\ub41c \ud0c0\uac9f\ub4e4\uc758 \uc815\ubcf4 \uc81c\uacf5.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udccb \uc8fc\uc694 \uceec\ub7fc \uc124\uba85<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\uceec\ub7fc\uba85<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>event_session_address<\/code><\/td><td>\uc138\uc158\uc758 \uba54\ubaa8\ub9ac \uc8fc\uc18c (XE \uc138\uc158\uacfc \uc870\uc778 \uc2dc \uc0ac\uc6a9)<\/td><\/tr><tr><td><code>target_address<\/code><\/td><td>\ud0c0\uac9f\uc758 \uba54\ubaa8\ub9ac \uc8fc\uc18c<\/td><\/tr><tr><td><code>target_name<\/code><\/td><td>\ud0c0\uac9f\uc758 \uc774\ub984 (\uc608:&nbsp;<code>ring_buffer<\/code>,&nbsp;<code>event_file<\/code>,&nbsp;<code>event_counter<\/code>)<\/td><\/tr><tr><td><code>execution_count<\/code><\/td><td>\ud0c0\uac9f\uc774 \uc2e4\ud589\ub41c \ud69f\uc218<\/td><\/tr><tr><td><code>last_execution_time<\/code><\/td><td>\ub9c8\uc9c0\ub9c9\uc73c\ub85c \ud0c0\uac9f\uc774 \uc2e4\ud589\ub41c \uc2dc\uac04<\/td><\/tr><tr><td><code>target_data<\/code><\/td><td>\uc218\uc9d1\ub41c \ud0c0\uac9f \ub370\uc774\ud130 (XML \ud615\uc2dd \ub610\ub294 \ubc14\uc774\ub108\ub9ac)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcc2 \ub300\ud45c\uc801\uc778 \ud0c0\uac9f \uc885\ub958<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\ud0c0\uac9f \uc774\ub984<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>ring_buffer<\/code><\/td><td>\uba54\ubaa8\ub9ac\uc5d0 \uc774\ubca4\ud2b8 \ub370\uc774\ud130\ub97c \uc800\uc7a5 (\ud718\ubc1c\uc131)<\/td><\/tr><tr><td><code>event_file<\/code><\/td><td>\uc774\ubca4\ud2b8 \ub370\uc774\ud130\ub97c \ud30c\uc77c\uc5d0 \uc800\uc7a5 (\uc601\uc18d\uc131)<\/td><\/tr><tr><td><code>histogram<\/code><\/td><td>\ud1b5\uacc4 \uc815\ubcf4\ub97c \ud788\uc2a4\ud1a0\uadf8\ub7a8 \ud615\ud0dc\ub85c \uc800\uc7a5<\/td><\/tr><tr><td><code>event_counter<\/code><\/td><td>\uc774\ubca4\ud2b8 \ubc1c\uc0dd \ud69f\uc218\ub9cc \uc800\uc7a5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0d \ud65c\uc6a9 \uc608\uc81c 1:&nbsp;<code>ring_buffer<\/code>\uc5d0\uc11c \uc774\ubca4\ud2b8 \ubcf4\uae30<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>SELECT \n    s.name AS session_name,\n    t.target_name,\n    CAST(t.target_data AS XML) AS target_data_xml\nFROM \n    sys.dm_xe_session_targets t\nJOIN \n    sys.dm_xe_sessions s ON t.event_session_address = s.address\nWHERE \n    t.target_name = 'ring_buffer';\n<\/code><\/pre>\n\n\n\n<p>\uc774 \uacb0\uacfc\uc758&nbsp;<code>target_data_xml<\/code>&nbsp;\uceec\ub7fc\uc740 \uc774\ubca4\ud2b8 \ub370\uc774\ud130\uac00 XML\ub85c \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0d \ud65c\uc6a9 \uc608\uc81c 2:&nbsp;<code>event_file<\/code>&nbsp;\uc0ac\uc6a9 \uc911\uc778 \ud0c0\uac9f \ud655\uc778<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>SELECT \n    s.name AS session_name,\n    t.target_name,\n    CAST(t.target_data AS XML) AS target_data\nFROM \n    sys.dm_xe_session_targets t\nJOIN \n    sys.dm_xe_sessions s ON t.event_session_address = s.address\nWHERE \n    t.target_name = 'event_file';\n<\/code><\/pre>\n\n\n\n<p>XML \ub0b4\ubd80\uc5d0\ub294 \uc774\ubca4\ud2b8 \ud30c\uc77c \uacbd\ub85c \ub4f1 \uba54\ud0c0\ub370\uc774\ud130\uac00 \ub4e4\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde9 \ud568\uaed8 \uc0ac\uc6a9\ud558\uba74 \uc88b\uc740 DMV\ub4e4<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>DMV<\/th><th>\uc124\uba85<\/th><\/tr><\/thead><tbody><tr><td><code>sys.dm_xe_sessions<\/code><\/td><td>\ud604\uc7ac \uc2e4\ud589 \uc911\uc778 XE \uc138\uc158 \ubaa9\ub85d<\/td><\/tr><tr><td><code>sys.dm_xe_session_events<\/code><\/td><td>\uc138\uc158\uc5d0\uc11c \uc218\uc9d1\ud558\uace0 \uc788\ub294 \uc774\ubca4\ud2b8 \uc815\ubcf4<\/td><\/tr><tr><td><code>sys.dm_xe_session_event_actions<\/code><\/td><td>\uc774\ubca4\ud2b8\uc5d0 \uc5f0\uacb0\ub41c \uc561\uc158 \uc815\ubcf4<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>sys.dm_xe_session_targets&nbsp;\ubdf0\ub294 SQL Server\uc758&nbsp;Extended Events (\ud655\uc7a5 \uc774\ubca4\ud2b8)&nbsp;\uae30\ub2a5\uc5d0\uc11c \uc0ac\uc6a9 \uc911\uc778&nbsp;\ud0c0\uac9f(target)&nbsp;\uc5d0 \ub300\ud55c \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774 DMV\ub294 \uc2e4\ud589 \uc911\uc778 XE \uc138\uc158\uc758&nbsp;\ud0c0\uac9f \uad6c\uc131\uacfc \uc0c1\ud0dc\ub97c \uc2e4\uc2dc\uac04\uc73c\ub85c \ubaa8\ub2c8\ud130\ub9c1\ud560 \ub54c \uc720\uc6a9\ud569\ub2c8\ub2e4. \ud83d\udccc \uac1c\ub150 \uc694\uc57d \ud83d\udccb \uc8fc\uc694 \uceec\ub7fc \uc124\uba85 \uceec\ub7fc\uba85 \uc124\uba85 event_session_address \uc138\uc158\uc758 \uba54\ubaa8\ub9ac \uc8fc\uc18c (XE \uc138\uc158\uacfc \uc870\uc778 \uc2dc \uc0ac\uc6a9) target_address \ud0c0\uac9f\uc758 \uba54\ubaa8\ub9ac \uc8fc\uc18c target_name \ud0c0\uac9f\uc758 \uc774\ub984 (\uc608:&nbsp;ring_buffer,&nbsp;event_file,&nbsp;event_counter) execution_count \ud0c0\uac9f\uc774 \uc2e4\ud589\ub41c \ud69f\uc218 last_execution_time \ub9c8\uc9c0\ub9c9\uc73c\ub85c\u2026 <span class=\"read-more\"><a href=\"https:\/\/sejiwon.com\/?p=506\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts\/506"}],"collection":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=506"}],"version-history":[{"count":2,"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/sejiwon.com\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sejiwon.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}