{"id":5609,"date":"2021-07-13T10:09:53","date_gmt":"2021-07-13T02:09:53","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=5609"},"modified":"2025-01-13T17:41:29","modified_gmt":"2025-01-13T09:41:29","slug":"odbc-%e8%bf%9e%e6%8e%a5-inceptor-%e9%85%8d%e7%bd%ae%e8%bf%87%e7%a8%8b%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=5609","title":{"rendered":"ODBC \u8fde\u63a5 inceptor \u914d\u7f6e\u8fc7\u7a0b\u5e38\u89c1\u95ee\u9898"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>\u672c\u6587\u5c31 ODBC \u914d\u7f6e\u5b8c\u6210\u540e\u8fde\u4e0d\u4e0a inceptor \u7684\u5e38\u89c1\u95ee\u9898\u8fdb\u884c\u6536\u5f55\u5f52\u7eb3\uff0cODBC \u5b89\u88c5\u914d\u7f6e\u8bf7\u53c2\u8003\u6587\u7ae0 <a href=\"\/?p=632\">Linux ODBC \u8fde\u63a5 Inceptor<\/a>\u3002<\/p>\n<p><\/br><\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<hr \/>\n<h4>1. \u6839\u636e\u624b\u518c\u7f16\u8bd1\u5b89\u88c5 Driver Manager \u65f6 <code>make<\/code> \u547d\u4ee4\u62a5\u9519\uff1aaclocal-1.11\uff1acommand not found<\/h4>\n<p>\u8be5\u62a5\u9519\u662f\u56e0\u4e3a\u6ca1\u6709\u88c5 automake\uff0c\u9700\u8981\u6267\u884c <code>yum install -y automake<\/code> \u5148\u5b89\u88c5\uff0c\u88c5\u5b8c\u540e <strong><font color=red>\u5fc5\u987b<\/font><\/strong> \u5f97\u91cd\u65b0\u89e3\u538b unixODBC \u5305\u518d\u8fdb\u884c\u7f16\u8bd1\u5b89\u88c5\u3002<\/p>\n<h4>2. isql \u8fde\u63a5\u6d4b\u8bd5\u62a5\u9519\uff1a[ISQL]ERROR: Could not SQLConnect<\/h4>\n<p>\u901a\u8fc7\u52a0\u53c2\u6570 <code>isql -v<\/code> \u80fd\u770b\u5230\u5982\u4e0b\u9519\u8bef\uff1a<\/p>\n<pre><code>[01000][unixODBC][Driver Manager]Can't open lib '\/usr\/local\/lib64\/libODBC4HiveServer2.so' : file not found<\/code><\/pre>\n<p><code>ldd \/usr\/local\/lib64\/libODBC4HiveServer2.so<\/code>\uff0c\u80fd\u770b\u5230 libsasl2.so.2==&gt;not found\uff0c\u53ef\u4ee5\u901a\u8fc7\u5982\u4e0b\u8f6f\u94fe\u63a5\u65b9\u5f0f\u89e3\u51b3\uff1a<\/p>\n<pre><code class=\"language-shell\">$ ln -sv \/usr\/lib64\/libsasl2.so.3.0.0 \/usr\/lib64\/libsasl2.so.2<\/code><\/pre>\n<h4>3.  isql \u8fde\u63a5\u6d4b\u8bd5\u62a5\u9519\uff1a SASL Other:No worthy mechd found\uff0c Segmentation faild<\/h4>\n<p>\u8be5\u62a5\u9519\u53ef\u901a\u8fc7\u5b89\u88c5\u5982\u4e0b\u5de5\u5177\u89e3\u51b3\uff1a<\/p>\n<pre><code>$ yum install cyrus-sasl-gssapi cyrus-sasl-plain -y<\/code><\/pre>\n<h4>4. \u914d\u7f6e\u6587\u4ef6\u90fd\u6b63\u786e\uff0c\u4f46 isql \u62a5  [Driver Manager]Data source name not found, and no default driver specified]<\/h4>\n<p><code>odbcinst -j<\/code> \u547d\u4ee4\u80fd\u53d1\u73b0\u6253\u5370\u7684\u914d\u7f6e\u4fe1\u606f\u6709\u95ee\u9898\uff0c\u539f\u56e0\u672a\u77e5\uff0c\u53ef\u901a\u8fc7\u5982\u4e0b\u65b9\u5f0f\u5c1d\u8bd5\u89e3\u51b3(\u6216\u52a0\u5165\u7528\u6237\u73af\u5883\u53d8\u91cf\uff0c\u8def\u5f84\u4e3a\u5b89\u88c5\u65f6\u7684 ODBC \u65f6\u7684\u5b9e\u9645\u8def\u5f84\uff0c\u672c\u4f8b\u4e3a \/etc)<\/p>\n<pre><code class=\"language-shell\">export ODBCSYSINI=\"\/etc\"\nexport ODBCINI=\"\/etc\/odbc.ini\"<\/code><\/pre>\n<h4>5.isql \u80fd\u6210\u529f\uff0c\u4f46\u662f\u4e00\u4e9b\u5ba2\u6237\u7aef\u5de5\u5177\uff08\u5982 php\uff09\u8fde\u63a5\u8fd8\u662f\u4f1a\u8fd4\u56de\u7b2c 2 \u70b9\u4e2d\u7684\u9519\u8bef\uff0cldd \u547d\u4ee4\u68c0\u67e5\u5176\u5b9e\u8fd8\u662f\u6709 libodbcinst.so.2 =&gt; not found<\/h4>\n<pre><code class=\"language-shell\">$ ln -sv \/usr\/local\/lib\/libodbcinst.so.2 \/usr\/lib64\/libodbcinst.so.2<\/code><\/pre>\n<h4>6.\u62a5\u9519[08004][unixODBC] Failed to connect to DSN=xxx  [ISQL]ERROR: Could not SQLConnect<\/h4>\n<pre><code class=\"language-shell\">[root@gts-spp-201~]# isql -v ldap\n[08004][unixODBC] Failed to connect to DSN=ldap;DATABASE=default;DRIVER=Transwarp Inceptor ODBC Driver;FRAMED=0;HIVE=Hive Server 2;HOST=172.22.37.203;MECH=LDAP;PASSWORD=IDENTIFIER_KW_NULL;PORT=10000;USE_ESCAPE=true;USER=IDENTIFIER_KW_NULL;\n[ISQL]ERROR: Could not SQLConnect<\/code><\/pre>\n<p>\u5982\u679cinceptor\u5f00\u542f\u7684LDAP \u8ba4\u8bc1\uff0c\u5fc5\u987b\u5728\u540e\u9762\u63d0\u4f9b\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/p>\n<pre><code class=\"language-shell\">[root@gts-spp-201~]# isql -v ldap hive 123456\n+---------------------------------------+\n| Connected!                            |\n|                                       |\n| sql-statement                         |\n| help [tablename]                      |\n| quit                                  |\n|                                       |\n+---------------------------------------+\n<\/code><\/pre>\n<h4>7.\u5bc6\u7801\u6b63\u786e\uff0c\u5404\u79cd\u59ff\u52bf\u90fd\u6b63\u786e\uff0c\u4f9d\u71366\u7684\u62a5\u9519\uff1a[08004][unixODBC] Failed to connect to DSN=xxx  [ISQL]ERROR: Could not SQLConnect<\/h4>\n<pre><code class=\"language-shell\">[08004][unixODBC] Failed to connect to DSN=ldap;DATABASE=default;DRIVER=Transwarp Inceptor ODBC Driver;FRAMED=0;HIVE=Hive Server 2;HOST=172.22.37.203;MECH=LDAP;PASSWORD=12345690;PORT=10000;USE_ESCAPE=true;USER=hive;\n[ISQL]ERROR: Could not SQLConnect\n<\/code><\/pre>\n<p>\u6392\u67e5\u4e00\u4e0b\u5bc6\u7801\u4e2d\u662f\u5426\u6709\u7279\u6b8a\u5b57\u7b26 <a href=\"https:\/\/community.microstrategy.com\/s\/article\/Special-character-restrictions-of-username-and-password-in-ODBC-connection-for-Diamond-and-Platinum-gateways-new?language=en_US\" title=\"Special character restrictions of username and password in ODBC connection for Diamond and Platinum gateways\">Special character restrictions of username and password in ODBC connection for Diamond and Platinum gateways<\/a><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2021\/07\/image-1736760888026.png\" alt=\"file\" \/><\/p>\n<p>Tips\uff1a\u6392\u67e5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u8c03\u6574 \/etc\/log4cplus.properties (\u6765\u81ea \/usr\/local\/inceptor) \u91cc\u7684\u65e5\u5fd7\u7ea7\u522b\u6765\u534f\u52a9\u5b9a\u4f4d <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u672c\u6587\u5c31 ODBC \u914d\u7f6e\u5b8c\u6210\u540e\u8fde\u4e0d\u4e0a inceptor \u7684\u5e38\u89c1\u95ee\u9898\u8fdb\u884c\u6536\u5f55\u5f52\u7eb3\uff0cODBC \u5b89\u88c5\u914d\u7f6e\u8bf7\u53c2 ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=5609\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,39,1],"tags":[191],"class_list":["post-5609","post","type-post","status-publish","format-standard","hentry","category-configuration","category-usage_issues","category-uncategorized","tag-odbc"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5609"}],"version-history":[{"count":2,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5609\/revisions"}],"predecessor-version":[{"id":15614,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5609\/revisions\/15614"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}