odbc installation and configuration and common problems
For installation and configuration, refer to:
1. Modification of configuration file
This use yum Installation, modification after installation odbc Two profiles: cat /etc/odbc.ini [dm8] Driver = DM8 ODBC DRIVER Description = DM ODBC DSND SERVER = 192.168.1.132 UID = SYSDBA PWD = SYSDBA TCP_PORT = 5236 cat /etc/odbcinst.ini [DM8 ODBC DRIVER] Description = ODBC DRIVER FOR DM8 Driver = /usr/lib/libdodbc.so
[oracle@localhost ~]$ isql -v dm8 +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
3. Common problems
(1) If the Damon client is not installed on the oracle server, you can install one or directly copy and upload it from the bin directory of the installed Damon.
(2) Note libdodbc So file, oracle needs permission to access this file. It can be found in / home / oracle / bash_ Add the path of Dameng bin directory in the profile, for example:
Also pay attention to permissions. Here, the file is directly copied to / usr/lib.
File configuration and points for attention
1. File location
Add the following contents to the document:
SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (SID_NAME=dm8) (ORACLE_HOME=/u01/oracle/product/11.2.0/db_1) (PROGRAM=dg4odbc) (ENVS=LD_LIBRARY_PATH=/u01/oracle/product/11.2.0/db_1/lib) ) )
3. Restart listening
[oracle@localhost ~]$ lsnrctl reload
PROGRAM=dg4odbc. Dg4odbc cannot be modified here. Do not change it to sid. Here, $Oracle will be executed_ A file named dg4odbc under home / bin is a protocol for Oracle to understand different databases;
1. File location
Add the following after the document
dm8 = (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=localhost) (PORT=1521) ) (CONNECT_DATA= (SID=dm8) ) (HS=OK) )
[oracle@localhost ~]$ tnsping dm8 TNS Ping Utility for Linux: Version 184.108.40.206.0 - Production on 30-JUL-2021 15:29:18 Copyright (c) 1997, 2009, Oracle. All rights reserved. Used parameter files: /u01/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=localhost) (PORT=1521)) (CONNECT_DATA= (SID=dm8)) (HS=OK)) OK (0 msec)
Both host and port are written in oracle, not the address and port of Dameng library.
vim initdm8.ora //new file HS_FDS_CONNECT_INFO=dm8 HS_FDS_TRACE_LEVEL = debug HS_FDS_SHAREABLE_NAME=/usr/lib/libdodbc.so HS_FDS_SUPPORT_STATISTICS=FALSE HS_LANGUAGE="simplified chinese_china.al32utf8" HS_NLS_NCHAR=UCS2 set ODBCINI=/etc/odbc.ini
(1) The new file name is init ora
(2)HS_ FDS_ CONNECT_ The names in info and odbc are consistent
(3)HS_ FDS_ TRACE_ Setting level to debug makes it easy to view the error log. Otherwise, an error is often reported during testing. In many cases, such an error is reported. I don't know what the problem is. Open the debug log to facilitate troubleshooting.
create database link dmlink connect to "SYSDBA" identified by "SYSDBA" using 'dm8';
If you put init HS in ora_ FDS_ TRACE_ Level is set to off. Once an error occurs, it is difficult to troubleshoot the problem. Problem encountered in configuration:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from <dblinkname>
We can't see the specific error information, and later tests found that many cases will report errors like this, such as init This error will be reported if the sid in the ora file name is written incorrectly, there is a problem with the character set in the configuration file, and the dynamic library file cannot be found.
After configuring to debug, in the directory
You can see the detailed error reporting reasons in the to facilitate troubleshooting.
For example, libdodbc.com was written incorrectly in the test So file name (written as libodbc.so)
vim initdm8.ora HS_FDS_SHAREABLE_NAME=/usr/lib/libodbc.so [oracle@localhost admin]$ sqlplus / as sysdba SQL*Plus: Release 220.127.116.11.0 Production on Fri Jul 30 15:48:14 2021 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 18.104.22.168.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS@orcl> select * from v$version@dmlink; select * from v$version@dmlink1 * ERROR at line 1: ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from DMLINK1
You can't tell the problem by reporting the wrong information.
Viewing the log, you can see:
Oracle Corporation --- FRIDAY JUL 30 2021 13:57:22.023 Version 22.214.171.124.0 Entered hgogprd HOSGIP for "HS_FDS_TRACE_LEVEL" returned "debug" Entered hgosdip setting HS_OPEN_CURSORS to default of 50 ....... Exiting hgosdip, rc=0 ORACLE_SID is "dm8" Product-Info: Port Rls/Upd:1/0 PrdStat:0 Agent:Oracle Database Gateway for ODBC ...... Failed to load ODBC library symbol: /usr/lib/libodbc.so(SQLAllocHandle) ......
For more information, please visit Dameng community: https://eco.dameng.com