{"id":693,"date":"2015-04-13T09:19:15","date_gmt":"2015-04-13T00:19:15","guid":{"rendered":"http:\/\/www.dbsheetclient.jp\/blog\/?p=693"},"modified":"2018-06-27T16:16:22","modified_gmt":"2018-06-27T07:16:22","slug":"%e8%87%aa%e5%be%8b%e5%9e%8b%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3","status":"publish","type":"post","link":"https:\/\/www.dbsheetclient.jp\/blog\/?p=693","title":{"rendered":"\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3"},"content":{"rendered":"<p>\u00a0IT\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306e\u30b7\u30e5\u30a6\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/150401_1003181.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-694\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/150401_1003181-225x300.jpg\" alt=\"untitled\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/150401_1003181-225x300.jpg 225w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/150401_1003181-768x1024.jpg 768w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/150401_1003181.jpg 1536w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>\u304d\u308c\u3044\u3060\u3063\u305f\u685c\u3082\u6563\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u306a\u304b\u306a\u304b\u5fd9\u3057\u304f\u3066\u3001\u3086\u3063\u304f\u308a\u82b1\u898b\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001\u307b\u3093\u306e1\u9031\u9593\u307b\u3069\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u529b\u3044\u3063\u3071\u3044\u54b2\u3044\u3066\u79c1\u305f\u3061\u3092\u611f\u52d5\u3055\u305b\u3001\u559c\u3070\u305b\u3066\u304f\u308c\u308b\u81ea\u7136\u3068\u306f\u3001\u672c\u5f53\u306b\u3059\u3054\u3044\u3068\u3001\u6539\u3081\u3066\u611f\u3058\u308b\u3053\u306e\u5b63\u7bc0\u3067\u3059\u306d\u3002<br \/>\u3061\u306a\u307f\u306b\u3001\u685c\u306e\u4e2d\u3067\u65e5\u672c\u3067\u5727\u5012\u7684\u306b\u591a\u3044\u306e\u304c\u30bd\u30e1\u30a4\u30e8\u30b7\u30ce\uff08\u67d3\u4e95\u5409\u91ce\uff09\u3067\u3059\u304c\u3001\u3082\u3068\u306f\u6c5f\u6238\u306e\u67d3\u4e95\u6751\u306e\u9020\u5712\u5e2b\u3084\u690d\u6728\u8077\u4eba\u306b\u3088\u3063\u3066\u80b2\u6210\u3055\u308c\u305f\u3082\u306e\u304c\u3001\u5404\u5730\u306b\u63a5\u6728\u3055\u308c\u3066\u5897\u3084\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u3059\u3079\u3066\u306e\u30bd\u30e1\u30a4\u30e8\u30b7\u30ce\u306f\u5143\u3092\u305f\u3069\u308c\u3070\u304b\u306a\u308a\u9650\u3089\u308c\u305f\u6570\u306e\u539f\u6728\u306b\u3064\u306a\u304c\u308a\u3001\u305d\u308c\u3089\u306e\u30af\u30ed\u30fc\u30f3\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\uff08\u4f1a\u793e\u306e\u540c\u50da\u304b\u3089\u6559\u3048\u3066\u3082\u3089\u3044\u307e\u3057\u305f\uff09<br \/><strong><br \/>\uff1c\u672c\u65e5\u306e\u984c\u6750\uff1e<br \/><\/strong>\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3<\/p>\n<p>\u4eca\u56de\u306f\u3001Oracle\u306b\u304a\u3051\u308b\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u306b\u3064\u3044\u3066\u3001\u898b\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001\u3042\u308b\u4e00\u9023\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u3092\u884c\u3046\u4e2d\u3067\u3001\u305d\u308c\u3068\u306f\u72ec\u7acb\u3057\u305f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u5ba3\u8a00\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3001\u30e1\u30a4\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u306f\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3055\u308c\u3066\u3082\u3001\u305d\u3053\u3060\u3051COMMIT\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\u79c1\u3082\u3001\u3042\u308b\u30c7\u30fc\u30bf\u5909\u63db\u3092\u884c\u3046\u30e1\u30a4\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u4e2d\u3067\u3001\u4f55\u3089\u304b\u306e\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u305f\u5834\u5408\u306b\u305d\u306e\u30a8\u30e9\u30fc\u304c\u3069\u3046\u3044\u3046\u3082\u306e\u306a\u306e\u304b\u3092\u30a8\u30e9\u30fc\u7528\u306e\u30ed\u30b0\u30c6\u30fc\u30d6\u30eb\u306b\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u6a5f\u80fd\u3067\u4f7f\u7528\u3057\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u5f53\u7136\u3001\u30e1\u30a4\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u306e\u3067\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3057\u3066\u4f55\u3082\u66f4\u65b0\u3055\u308c\u306a\u3044\u72b6\u614b\u306b\u3057\u307e\u3059\u304c\u3001\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u306f\u30ed\u30b0\u306b\u66f8\u304d\u51fa\u3057\u305f\u3044\u306e\u3067\u3001\u30e1\u30a4\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u306f\u72ec\u7acb\u3057\u305f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u3057\u3066\u3001\u4f8b\u5916\u51e6\u7406\u306e\u4e2d\u3067\u30ed\u30b0\u306b\u767b\u9332\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<br \/>\uff08\u30ed\u30b0\u306e\u767b\u9332\u3092\u30e1\u30a4\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u5165\u308c\u3066\u3057\u307e\u3046\u3068\u3001\u30a8\u30e9\u30fc\u6642\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308c\u3070\u3001\u30ed\u30b0\u3078\u306e\u767b\u9332\u3082\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\uff09<br \/>\u307b\u3068\u3093\u3069\u30aa\u30e9\u30af\u30eb\u793e\u306e\u63d0\u793a\u3057\u3066\u3044\u305f\u30b5\u30f3\u30d7\u30eb\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u305f\u304b\u305f\u3061\u3067\u306f\u3042\u308a\u307e\u3057\u305f\u304c\u3002\u3002\u3002<\/p>\n<p>\u4f8b\uff09<br \/>\u2460\u307e\u305a\u3001\u30a8\u30e9\u30fc\u30ed\u30b0\u7528\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210<\/p>\n<p>CREATE TABLE ERROR_LOG (<br \/>\u00a0 \u00a0ERROR_CODE NUMBER<br \/>\u00a0 , ERROR_MESSAGE VARCHAR2(4000)<br \/>\u00a0 , BACKTRACE CLOB<br \/>\u00a0 , CALLSTACK CLOB<br \/>\u00a0 , CREATED_ON DATE<br \/>\u00a0 , CREATED_BY VARCHAR2(30)<br \/>);<\/p>\n<p>\u2461\u30a8\u30e9\u30fc\u8a18\u9332\u7528\u306e\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u4f5c\u6210<\/p>\n<p>\u3053\u3053\u3067\u3001\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u5ba3\u8a00\u3092\u3001PRAGMA AUTONOMOUS_TRANSACTION;\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>CREATE OR REPLACE PROCEDURE record_error<br \/>IS<br \/>\u00a0 \u00a0PRAGMA AUTONOMOUS_TRANSACTION;\u00a0 \u00a0 \u00a0&#8212; \u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u5ba3\u8a00<br \/>\u00a0 \u00a0l_code\u00a0 PLS_INTEGER := SQLCODE;<br \/>\u00a0 \u00a0l_mesg\u00a0 VARCHAR2(32767) := SQLERRM;<br \/>BEGIN<br \/>\u00a0 \u00a0INSERT INTO error_log (error_code<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0,\u00a0 error_message<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0,\u00a0 backtrace<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0,\u00a0 callstack<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0,\u00a0 created_on<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0,\u00a0 created_by)<br \/>\u00a0 \u00a0 \u00a0 \u00a0 VALUES (l_code<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , l_mesg<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , sys.DBMS_UTILITY.format_error_backtrace<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , sys.DBMS_UTILITY.format_call_stack<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , SYSDATE<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , USER);<br \/>\u00a0<br \/>\u00a0 \u00a0COMMIT;<br \/>END;<br \/>\/<\/p>\n<p>\u203bDBMS_UTILITY.format_error_backtrace \u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u884c\u3092\u53d6\u5f97\u3057\u3001DBMS_UTILITY.format_call_stack \u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u306f\u3001\u30a8\u30e9\u30fc\u767a\u751f\u7b87\u6240\u307e\u3067\u306e\u5b9f\u884c\u30b3\u30fc\u30eb\u30b9\u30bf\u30c3\u30af\u3001\u3069\u306e\u3088\u3046\u306b\u51e6\u7406\u304c\u547c\u3073\u51fa\u3055\u308c\u3066\u304d\u305f\u304b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u2462\u4e0a\u8a18\u306e\u30a8\u30e9\u30fc\u8a18\u9332\u7528\u306e\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u3001\u30e1\u30a4\u30f3\u306e\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u4f8b\u5916\u51e6\u7406\u3067\u547c\u3073\u51fa\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u7c21\u5358\u306a\u4f8b\u3068\u3057\u3066\u3001\u90e8\u9580\u8868(DEPT)\u306b\u30c7\u30fc\u30bf\u3092\u767b\u9332\u3059\u308b\u3068\u3044\u3046\u51e6\u7406\u3092\u4f5c\u6210\u3057\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3089\u51e6\u7406\u306f\u5168\u3066\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3057\u307e\u3059\u304c\u3001\u30a8\u30e9\u30fc\u30ed\u30b0\u306b\u30a8\u30e9\u30fc\u306e\u8a18\u9332\u3092\u6b8b\u3059\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>BEGIN<br \/>\u00a0 \u00a0 INSERT INTO DEPT VALUES (50, &#8216;PLANNING&#8217;, &#8216;LOS ANGELES&#8217;);<br \/>\u00a0 \u00a0 INSERT INTO DEPT VALUES (60, &#8216;DEVELOPMENT&#8217;, &#8216;SEATTLE&#8217;);<br \/>\u00a0 \u00a0 INSERT INTO DEPT VALUES (50, &#8216;GENERAL AFFAIRS&#8217;, &#8216;SAN FRANCISCO&#8217;);<br \/>\u00a0<br \/>COMMIT;<\/p>\n<p>&#8211;\u4f8b\u5916\u51e6\u7406<br \/>EXCEPTION<br \/>\u00a0 \u00a0WHEN others THEN<br \/>\u00a0 \u00a0 \u00a0record_error();<br \/>\u00a0 \u00a0 \u00a0RAISE;<br \/>END;<br \/>\/<\/p>\n<p>\u4e0a\u8a18\u306f\u3001DEPT\u8868\u3078\u306e\u30c7\u30fc\u30bf\u306e\u767b\u9332\u3092\u884c\u3063\u3066\u3001\u6700\u5f8c\u306bCOMMIT;\u3092\u5b9f\u884c\u3059\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u9014\u4e2d\u3067DEPTNO\u306e\u30ad\u30fc\u91cd\u8907\u306b\u3088\u308a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u305d\u306e\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u3092\u300cerror_log\u300d\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u8a18\u9332\u3092\u6b8b\u3059\u3068\u3044\u3046\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/plsql_\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-699\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/plsql_\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3-300x178.jpg\" alt=\"plsql_\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\" width=\"497\" height=\"295\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/plsql_\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3-300x178.jpg 300w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/plsql_\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3.jpg 645w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/p>\n<p><\/a>DEPT\u8868\u306e\u4e2d\u8eab\u306f\u3001<br \/>SELECT * FROM DEPT;<a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/plsql_\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3.jpg\"><br \/><\/a><\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/select_dept.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-700\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/select_dept-300x79.jpg\" alt=\"select_dept\" width=\"471\" height=\"124\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/select_dept-300x79.jpg 300w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/select_dept.jpg 633w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><br \/><\/a><\/p>\n<p>\u51e6\u7406\u306f\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>ERROR_LOG \u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u306f\u3001<br \/>SELECT * FROM error_log;<\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/error_log.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-701\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/error_log-300x172.jpg\" alt=\"error_log\" width=\"473\" height=\"271\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/error_log-300x172.jpg 300w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/error_log.jpg 655w\" sizes=\"auto, (max-width: 473px) 100vw, 473px\" \/><\/a><\/p>\n<p>\u00a0\u30a8\u30e9\u30fc\u306e\u5185\u5bb9\u304c\u30ed\u30b0\u3068\u3057\u3066\u8a18\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001SQL Server\u306b\u304a\u3044\u3066\u306f\u3001\u81ea\u5f8b\u578b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u6a5f\u80fd\u306f\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u540c\u69d8\u306a\u51e6\u7406\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u306b\u306f\u3001TRY \uff5eCATCH\u306eCATCH\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3067\u3001\u65b0\u305f\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3057\u3066\u30ed\u30b0\u306e\u767b\u9332\u3092\u884c\u3046\u306a\u3069\u306e\u51e6\u7406\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u3068\u540c\u69d8\u306e\u51e6\u7406\u3092\u884c\u3046\u3068\u3059\u308b\u3068\u3001<\/p>\n<p>BEGIN TRY<br \/>\u00a0 BEGIN TRAN<br \/>\u00a0 \u00a0 \u00a0 INSERT INTO DEPT VALUES (50, &#8216;PLANNING&#8217;, &#8216;LOS ANGELES&#8217;);<br \/>\u00a0 \u00a0 \u00a0 INSERT INTO DEPT VALUES (60, &#8216;DEVELOPMENT&#8217;, &#8216;SEATTLE&#8217;);<br \/>\u00a0 \u00a0 \u00a0 INSERT INTO DEPT VALUES (50, &#8216;GENERAL AFFAIRS&#8217;, &#8216;SAN FRANCISCO&#8217;);<br \/>\u00a0 \u00a0 \u00a0 COMMIT<br \/>END TRY<\/p>\n<p>BEGIN CATCH<br \/>\u00a0 IF @@TRANCOUNT &gt; 0<br \/>\u00a0 \u00a0 \u00a0 ROLLBACK\u00a0<\/p>\n<p>\u00a0 BEGIN TRAN<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0SELECT ERROR_NUMBER()<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_SEVERITY() AS \u30a8\u30e9\u30fc\u91cd\u5927\u5ea6<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_MESSAGE() AS \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_LINE()<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0INSERT INTO error_log(<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ERROR_NUMBER<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_SEVERITY<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_MESSAGE<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_LINE<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 )<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0SELECT <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ERROR_NUMBER()<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_SEVERITY() AS \u30a8\u30e9\u30fc\u91cd\u5927\u5ea6<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_MESSAGE() AS \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 , ERROR_LINE()<br \/>\u00a0 \u00a0COMMIT;<br \/>END CATCH<\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsrv_\u81ea\u5f8b\u578b\u4ee3\u308f\u308a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-707\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsrv_\u81ea\u5f8b\u578b\u4ee3\u308f\u308a-300x274.jpg\" alt=\"sqlsrv_\u81ea\u5f8b\u578b\u4ee3\u308f\u308a\" width=\"439\" height=\"401\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsrv_\u81ea\u5f8b\u578b\u4ee3\u308f\u308a-300x274.jpg 300w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsrv_\u81ea\u5f8b\u578b\u4ee3\u308f\u308a.jpg 696w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/p>\n<p><\/a><\/p>\n<p>DEPT\u8868\u306e\u4e2d\u8eab\u306f\u3001<br \/>SELECT * FROM dbo.DEPT;<\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_dept\u78ba\u8a8d.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-708\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_dept\u78ba\u8a8d-300x183.jpg\" alt=\"sqlsvr_dept\u78ba\u8a8d\" width=\"346\" height=\"211\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_dept\u78ba\u8a8d-300x183.jpg 300w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_dept\u78ba\u8a8d.jpg 384w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><br \/><\/a><\/p>\n<p>ROLLBACK\u3055\u308c\u3066\u3001\u30ec\u30b3\u30fc\u30c9\u306f\u5897\u3048\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>ERROR_LOG\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u306f\u3001<\/p>\n<p>SELECT * FROM dbo.ERROR_LOG;<\/p>\n<p><a href=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_err_log\u78ba\u8a8d.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-709\" src=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_err_log\u78ba\u8a8d-300x74.jpg\" alt=\"sqlsvr_err_log\u78ba\u8a8d\" width=\"499\" height=\"123\" srcset=\"https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_err_log\u78ba\u8a8d-300x74.jpg 300w, https:\/\/www.dbsheetclient.jp\/blog\/wp-content\/uploads\/2015\/04\/sqlsvr_err_log\u78ba\u8a8d.jpg 786w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p>\u30a8\u30e9\u30fc\u60c5\u5831\u304c\u8a18\u9332\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u65e5\u306f\u4ee5\u4e0a\u307e\u3067<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0IT\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u306e\u30b7\u30e5\u30a6\u3067\u3059\u3002 \u304d\u308c\u3044\u3060\u3063\u305f\u685c\u3082\u6563\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u306a\u304b\u306a\u304b\u5fd9\u3057\u304f\u3066\u3001\u3086\u3063\u304f\u308a\u82b1\u898b\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001\u307b\u3093\u306e1\u9031\u9593\u307b\u3069\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u529b\u3044\u3063\u3071\u3044\u54b2\u3044\u3066\u79c1\u305f\u3061\u3092\u611f\u52d5\u3055\u305b\u3001\u559c\u3070\u305b\u3066\u304f\u308c\u308b\u81ea\u7136\u3068 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[12],"tags":[],"class_list":["post-693","post","type-post","status-publish","format-standard","hentry","category-12"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=693"}],"version-history":[{"count":14,"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/693\/revisions"}],"predecessor-version":[{"id":1955,"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/693\/revisions\/1955"}],"wp:attachment":[{"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbsheetclient.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}