{"action":"created","issue":{"url":"https://api.github.com/repos/yandex/clickhouse-odbc/issues/138","repository_url":"https://api.github.com/repos/yandex/clickhouse-odbc","labels_url":"https://api.github.com/repos/yandex/clickhouse-odbc/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/yandex/clickhouse-odbc/issues/138/comments","events_url":"https://api.github.com/repos/yandex/clickhouse-odbc/issues/138/events","html_url":"https://github.com/yandex/clickhouse-odbc/issues/138","id":384697795,"node_id":"MDU6SXNzdWUzODQ2OTc3OTU=","number":138,"title":"Oracle: Драйвер не работает из Oracle через GD4ODBC","user":{"login":"bazhunov","id":10251211,"node_id":"MDQ6VXNlcjEwMjUxMjEx","avatar_url":"https://avatars3.githubusercontent.com/u/10251211?v=4","gravatar_id":"","url":"https://api.github.com/users/bazhunov","html_url":"https://github.com/bazhunov","followers_url":"https://api.github.com/users/bazhunov/followers","following_url":"https://api.github.com/users/bazhunov/following{/other_user}","gists_url":"https://api.github.com/users/bazhunov/gists{/gist_id}","starred_url":"https://api.github.com/users/bazhunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazhunov/subscriptions","organizations_url":"https://api.github.com/users/bazhunov/orgs","repos_url":"https://api.github.com/users/bazhunov/repos","events_url":"https://api.github.com/users/bazhunov/events{/privacy}","received_events_url":"https://api.github.com/users/bazhunov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-27T09:26:05Z","updated_at":"2018-12-27T17:00:14Z","closed_at":null,"author_association":"NONE","body":"При попытке выполнить SELECT из Oracle через настроенный dblink к ClickHouse, возвращается ошибка.\r\n\r\n```\r\nSQL>  select \"date_event\" from \"connect.test_data\"@CLICK;\r\n select \"date_event\" from \"connect.test_data\"@CLICK\r\n\r\nERROR at line 1:\r\nORA-28511: lost RPC connection to heterogeneous remote agent using\r\nSID=ORA-28511: lost RPC connection to heterogeneous remote agent using\r\nSID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.0.5)(PORT=1522))(CONNECT_DA\r\nTA=(SID=CLICKHOUSE)))\r\nORA-02063: preceding line from CLICK\r\n```\r\n\r\nПри этом в ISQL все выполняется корректно.\r\n```\r\n $ echo  select \"date_event\" from \"connect.test_data\" | isql CLICKHOUSE data *****\r\n+---------------------------------------+\r\n| Connected!                            |\r\n|                                       |\r\n| sql-statement                         |\r\n| help [tablename]                      |\r\n| quit                                  |\r\n|                                       |\r\n+---------------------------------------+\r\nSQL> +--------------------+\r\n| date_event         |\r\n+--------------------+\r\n| 2018-11-13 11:29:28|\r\n| 2018-11-13 11:29:28|\r\n| 2018-11-13 11:29:28|\r\n...\r\n\r\n```\r\nВ логах oracle ( $ORACLE_HOME/hs/log/CLICKHOUSE_agt_NNNN.trc) видим следующую ошибку:\r\n```\r\n...\r\nEntered hgopoer at 2018/11/27-11:03:54\r\nhgopoer, line 231: got native error 1 and sqlstate 07009; message follows...\r\nColumn number is out of range {07009,NativeErr = 1}\r\nhgoulcp, line 1192: calling SQLBindCol got sqlstate 07009\r\nExiting hgoulcp, rc=28500 at 2018/11/27-11:03:54 with error ptr FILE:hgoulcp.c LINE:1192 FUNCTION:hgoulcp() ID:Bindcol: Type Name\r\n...\r\n\r\n```\r\n\r\n**-----------------------------------------------------------------------------------**\r\n**Libs:**\r\n```\r\nDriverName: CLICKHOUSEODBC.DLL, \r\nDriverVer: 1.0.0.20181017\r\n$ objdump -f /usr/lib/x86_64-linux-gnu/odbc/libclickhouseodbc.so\r\n\r\n/usr/lib/x86_64-linux-gnu/odbc/libclickhouseodbc.so:     file format elf64-x86-64\r\narchitecture: i386:x86-64, flags 0x00000150:\r\n\r\n$ isql --version\r\nunixODBC 2.3.7\r\n\r\n```\r\n\r\n**OS:** \r\n```\r\nDISTRIB_ID=Ubuntu\r\nDISTRIB_RELEASE=14.04\r\nDISTRIB_CODENAME=trusty\r\nDISTRIB_DESCRIPTION=\"Ubuntu 14.04.5 LTS\"\r\n$ uname -a\r\nLinux c659382d024c 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n```\r\n**Orcale:** Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production\r\n\r\n**$ORACLE_HOME/hs/admin/initCLICKHOUSE.ora:**\r\n```\r\nHS_FDS_CONNECT_INFO = CLICKHOUSE\r\nHS_FDS_TRACE_LEVEL= 255\r\nHS_FDS_SHAREABLE_NAME = /usr/lib/x86_64-linux-gnu/libodbc.so\r\nHS_FDS_SUPPORT_STATISTICS = FALSE\r\nHS_FDS_SQLLEN_INTERPRETATION = 64\r\nHS_LANGUAGE=AMERICAN_AMERICA.UTF8\r\nHS_NLS_NCHAR = UCS2\r\nset ODBCINI=/usr/local/etc/odbc.ini\r\n```\r\n\r\n**/usr/local/etc/odbc.ini:**\r\n```\r\nDescription = ClickHouse driver\r\nurl = http://<IP>:8123/query?database=connect\r\nuid = data\r\npassword = ****\r\n\r\n```\r\n\r\n\r\n**$ORACLE_HOME/network/admin/listener.ora**\r\n```\r\nSID_LIST_LISTENER =\r\n  (SID_LIST =\r\n...\r\n    (SID_DESC =\r\n      (SID_NAME = CLICKHOUSE)\r\n      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)\r\n      (PROGRAM = dg4odbc)\r\n      (ENVS=\"LD_LIBRARY_PATH=/usr/lib64:/u01/app/oracle/product/11.2.0/xe/hs/lib:/usr/lib/x86_64-linux-gnu:/u01/app/oracle/product/11.2.0/xe/lib\")\r\n    )\r\n  )\r\n\r\nLISTENER =\r\n  (DESCRIPTION_LIST =\r\n    (DESCRIPTION =\r\n      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))\r\n...\r\n      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.0.5)(PORT = 1522))\r\n    )\r\n  )\r\n\r\nDEFAULT_SERVICE_LISTENER = (central)\r\n```\r\n\r\n**$ORACLE_HOME/network/admin/tnsnames.ora:**\r\n```\r\n...\r\nCLICKHOUSE=\r\n  (DESCRIPTION =\r\n    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.0.5)(PORT = 1522))\r\n      (CONNECT_DATA =\r\n        (SID = CLICKHOUSE))\r\n      (HS = OK)\r\n  )\r\n...\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yandex/clickhouse-odbc/issues/comments/450191188","html_url":"https://github.com/yandex/clickhouse-odbc/issues/138#issuecomment-450191188","issue_url":"https://api.github.com/repos/yandex/clickhouse-odbc/issues/138","id":450191188,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDE5MTE4OA==","user":{"login":"proller","id":1752192,"node_id":"MDQ6VXNlcjE3NTIxOTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1752192?v=4","gravatar_id":"","url":"https://api.github.com/users/proller","html_url":"https://github.com/proller","followers_url":"https://api.github.com/users/proller/followers","following_url":"https://api.github.com/users/proller/following{/other_user}","gists_url":"https://api.github.com/users/proller/gists{/gist_id}","starred_url":"https://api.github.com/users/proller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proller/subscriptions","organizations_url":"https://api.github.com/users/proller/orgs","repos_url":"https://api.github.com/users/proller/repos","events_url":"https://api.github.com/users/proller/events{/privacy}","received_events_url":"https://api.github.com/users/proller/received_events","type":"User","site_admin":false},"created_at":"2018-12-27T17:00:14Z","updated_at":"2018-12-27T17:00:14Z","author_association":"MEMBER","body":" А если в odbc.ini написать\r\ntrace=1                            \r\ntracefile=/tmp/chlickhouse-odbc.log\r\n\r\nто что в файле будет ?"}}
{"actor":{"display_login":"proller"}}