{"id":2707,"date":"2019-07-19T09:55:09","date_gmt":"2019-07-19T01:55:09","guid":{"rendered":"http:\/\/jason695.why3s.tw\/wordpress\/?p=2707"},"modified":"2019-07-19T09:59:28","modified_gmt":"2019-07-19T01:59:28","slug":"msdtc","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2019\/07\/19\/msdtc\/","title":{"rendered":"MSDTC"},"content":{"rendered":"\n<p>\u5982\u9047\u5230CALL \u9060\u7aef(LINK DB)\u7684SP\uff0c\u6536\u5176\u7522\u751f\u7684\u7d50\u679c\u96c6\uff0c\u51fa\u73fe\u4ee5\u4e0b\u932f\u8aa4\u8a0a\u606f<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"40\" src=\"https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/%E5%9C%96%E7%89%87.png?resize=712%2C40&#038;ssl=1\" alt=\"\" class=\"wp-image-2710\" srcset=\"https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/%E5%9C%96%E7%89%87.png?w=919&amp;ssl=1 919w, https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/%E5%9C%96%E7%89%87.png?resize=300%2C17&amp;ssl=1 300w, https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/%E5%9C%96%E7%89%87.png?resize=768%2C43&amp;ssl=1 768w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/figure>\n\n\n\n<p>SAMPLE CODE:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \nIF OBJECT_ID (N'tempdb..#REL', N'U') IS NOT NULL\n    DROP TABLE #REL\n\ncreate table #REL\n(\nCOL1 varchar(50) NOT NULL\n,COL2 varchar(50) NULL  \n)\n\ninsert into #REL\nexec [1.2.3.4].XXDB.dbo.[SP_QryRM] \n\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u89e3\u6cd51:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u3010Windows\u3011\u555f\u7528 MSDTC \u670d\u52d9\u8207\u76f8\u95dc\u8a2d\u5b9a<a href=\"https:\/\/dotblogs.com.tw\/echo\/2017\/08\/24\/windows_msdtc_setting\">https:\/\/dotblogs.com.tw\/echo\/2017\/08\/24\/windows_msdtc_setting<\/a><\/p><\/blockquote>\n\n\n\n<p>\u9700\u8981\u958b\u5f88\u591aPORT\uff0c\u8abf\u7cfb\u7d71\u8a2d\u5b9a\u53ca\u91cd\u958b\u6a5f\uff0c\u8d85\u9ebb\u7169\u7684\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u89e3\u6cd52:<\/p>\n\n\n\n<p>\u8a2d\u5b9aLINK  DB\uff0c\u555f\u7528RPC\u7684\u5206\u6563\u5f0f\u4ea4\u6613\u4fc3\u92b7\u8a2d\u70baFALSE<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"432\" height=\"284\" src=\"https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/RPC.png?resize=432%2C284&#038;ssl=1\" alt=\"\" class=\"wp-image-2709\" srcset=\"https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/RPC.png?w=432&amp;ssl=1 432w, https:\/\/i0.wp.com\/jason695.why3s.tw\/wordpress\/wp-content\/uploads\/RPC.png?resize=300%2C197&amp;ssl=1 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u89e3\u6cd53:<\/p>\n\n\n\n<p>OPENROWSET\uff0c\u53ef\u662f\u5728SQL 2016\u53ef\u80fd\u6703\u6709\u554f\u984c\uff1f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>IF OBJECT_ID('tempdb..#tmp') IS NOT NULL\n    DROP TABLE #tmp\nGO\nCREATE TABLE #tmp (\n    APPLY_HOUSE_SEQNO varchar(30),\n    APPNO varchar(30)\n    )\n\nINSERT INTO #tmp           \nSELECT *\nFROM OPENROWSET('SQLOLEDB','1.2.3.4,1433';'ID';'PWD','SET FMTONLY OFF; EXEC XXDB.dbo.SP_ONLINE_888')\n\nselect * from #tmp \n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u9047\u5230CALL \u9060\u7aef(LINK DB)\u7684SP\uff0c\u6536\u5176\u7522\u751f\u7684\u7d50\u679c\u96c6\uff0c\u51fa\u73fe\u4ee5\u4e0b\u932f\u8aa4\u8a0a\u606f SAMPLE CODE: \u89e3 &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2019\/07\/19\/msdtc\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">MSDTC<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[47],"tags":[],"class_list":["post-2707","post","type-post","status-publish","format-standard","hentry","category-sql-server","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/2707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=2707"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/2707\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=2707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=2707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=2707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}