{"id":113,"date":"2010-12-29T00:09:48","date_gmt":"2010-12-28T16:09:48","guid":{"rendered":"http:\/\/www.royalwzy.com\/?p=113"},"modified":"2013-12-30T10:58:18","modified_gmt":"2013-12-30T02:58:18","slug":"sqlserver%e6%95%b0%e6%8d%ae%e5%ba%93%e8%ae%bf%e9%97%aeoracle%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"http:\/\/www.royalwzy.com\/?p=113","title":{"rendered":"SqlServer\u6570\u636e\u5e93\u8bbf\u95eeOracle\u6570\u636e\u5e93"},"content":{"rendered":"<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u6700\u8fd1\u8981\u5b9e\u73b0\u4e00\u6bb5\u4e1a\u52a1,\u628aSqlserver\u6570\u636e\u5e93\u4e2d\u8868\u7684\u6570\u636e\u4f5c\u4e3a\u6761\u4ef6\u5728Oracle\u6838\u5fc3\u5e93\u4e2d\u67e5\u8be2\u5230\u76f8\u5e94\u7684\u6570\u636e,\u7136\u540e\u518d\u5728SqlServer\u6570\u636e\u5e93\u4e2d\u505a\u7edf\u8ba1\u4fe1\u606f.\u6240\u4ee5\u8981\u5b9e\u73b0Sqlserver\u6570\u636e\u5e93\u5230Oracle\u7684DBlink\u628a\u6570\u636e\u4eceOracle\u6570\u636e\u5e93\u4e2d\u62c9\u51fa\u6765.<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0<\/span><\/div>\n<p><span style=\"color: #333333; font-style: normal; font-variant: normal; font-family: 'Courier New'; font-size: 13px;\">\u51c6\u5907\u5de5\u4f5c:<\/span><\/p>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">1.\u5fc5\u987b\u5b89\u88c5SqlServer\u6570\u636e\u5e93;<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">2.\u8981\u6709Oracle\u7684\u5ba2\u6237\u7aef,\u5ba2\u6237\u7aef\u7248\u672c\u4e0d\u4f4e\u4e8eOracle\u6570\u636e\u5e93\u7684\u7248\u672c;<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">3.\u914d\u7f6etnsnames.ora\u6587\u4ef6(\u8def\u5f84:$ORACLE_HOME$\\db_1\\NETWORK\\ADMIN\\tnsnames.ora)<\/span><\/div>\n<blockquote style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; margin: 0px 0px 0px 40px; border-style: none;\">\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">OrclDBLink =<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0 (DESCRIPTION =<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0\u00a0 (ADDRESS_LIST =<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0\u00a0\u00a0\u00a0 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0\u00a0 )<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0\u00a0 (CONNECT_DATA =<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0\u00a0\u00a0\u00a0 (SERVICE_NAME = ORCL.SNDA.COM)<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0\u00a0 )<\/span><\/div>\n<div><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0 )<\/span><\/div>\n<\/blockquote>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">4.\u6d4b\u8bd5tns\u914d\u7f6e\u662f\u5426\u6210\u529f,\u4f7f\u7528sqlplus\u547d\u540d\u5728\u547d\u4ee4\u884c\u7a97\u53e3\u767b\u5f55,\u5982\u679c\u80fd\u591f\u767b\u5f55\u6210\u529f\u8bf4\u660etnsname.ora\u914d\u7f6e\u6b63\u786e.<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0<img decoding=\"async\" style=\"border-style: none;\" alt=\"\" src=\"http:\/\/hi.csdn.net\/attachment\/201112\/23\/0_13246187618WN8.gif\" \/><br \/>\n<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u521b\u5efa\u8fde\u63a5\u670d\u52a1\u5668<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">1.\u5728\u5e38\u89c4\u9875\u9762\u914d\u7f6e,\u5982\u56fe:<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0<img decoding=\"async\" style=\"border-style: none;\" alt=\"\" src=\"http:\/\/hi.csdn.net\/attachment\/201112\/23\/0_1324618766z711.gif\" \/><br \/>\n<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">2.\u5728\u5b89\u5168\u6027\u9875\u9762\u914d\u7f6e,\u5982\u56fe:<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0\u00a0<img decoding=\"async\" style=\"border-style: none;\" alt=\"\" src=\"http:\/\/hi.csdn.net\/attachment\/201112\/23\/0_1324618770Louu.gif\" \/><br \/>\n<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u00a0<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u6d4b\u8bd5\u8bbf\u95eeOracle\u6570\u636e\u5e93<\/span><\/div>\n<div style=\"color: #333333; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal;\"><span style=\"font-family: 'Courier New'; font-size: 13px;\">1.SELECT * FROM\u00a0<\/span><span style=\"font-family: 'Courier New'; font-size: 13px; color: #e30000;\">DBLINK..HR.EMPLOYEES<\/span><span style=\"font-family: 'Courier New'; font-size: 13px;\">; \u6b64\u67e5\u8be2\u5bf9\u8c61\u8981\u7528\u5927\u5199,\u5982\u679c\u67e5\u8be2\u67d0\u4e2a\u5b57\u6bb5\u4e5f\u8981\u4f7f\u7528\u5927\u5199,\u8fde\u63a5\u670d\u52a1\u5668\u540e\u9762\u662f\u4e24\u70b9[..]<br \/>\n2.SELECT * FROM\u00a0<\/span><span style=\"font-family: 'Courier New'; font-size: 13px; color: #e30000;\">openquery(DBLINK, &#8216;SELECT * FROM HR.EMPLOYEES&#8217;);<\/span><span style=\"font-family: 'Courier New'; font-size: 13px;\">\u6b64\u65b9\u6cd5\u6bd4\u4e0a\u4e00\u79cd\u65b9\u6cd5\u5feb50%,\u6b64\u65b9\u6cd5\u8ddf\u76f4\u63a5\u8fdeOracle\u7684\u901f\u5ea6\u76f8\u5f53.<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u8981\u5b9e\u73b0\u4e00\u6bb5\u4e1a\u52a1,\u628aSqlserver\u6570\u636e\u5e93\u4e2d\u8868\u7684\u6570\u636e\u4f5c\u4e3a\u6761\u4ef6\u5728Oracle\u6838\u5fc3\u5e93\u4e2d\u67e5\u8be2\u5230\u76f8\u5e94\u7684\u6570\u636e,\u7136\u540e\u518d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[34,2],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle","tag-oracle_basics"],"_links":{"self":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":0,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}