ODBCを使用してtrafodionソフトウェアに接続するには、ODBCと構成をインストールします.
4560 ワード
1.unixODBCをインストールするかどうかを確認する:
3.Trafodion ODBCドライバをインストールする;駆動インストールパッケージesgynDB_clients-2.2.1-RH6-x86_64.tar.gz;インストール中にデフォルト設定をすべて選択
4.追加/etc/odbc.ini
[trafodion@esgyn-01 testtxt]$ rpm -qa|grep unixODBC
unixODBC-2.2.14-14.el6.x86_64
[trafodion@esgyn-01 testtxt]$
2. インストールされていない場合は、次の操作を行います.yum install unixODBC.x86_64
3.Trafodion ODBCドライバをインストールする;駆動インストールパッケージesgynDB_clients-2.2.1-RH6-x86_64.tar.gz;インストール中にデフォルト設定をすべて選択
[root@n09 chenqilin]# ls
esgynDB_clients-2.2.1-RH6-x86_64.tar.gz esgyn-tpcds-kit python
[root@n09 chenqilin]#
[root@n09 chenqilin]# tar xzf esgynDB_clients-2.2.1-RH6-x86_64.tar.gz
[root@n09 chenqilin]# ls
clients esgynDB_clients-2.2.1-RH6-x86_64.tar.gz esgyn-tpcds-kit python
[root@n09 chenqilin]#
[root@n09 chenqilin]# cd clients/
[root@n09 clients]# ls
DISCLAIMER jdbcT4-2.2.1.zip LICENSE_Esgyn odb64_linux.tar.gz trafci.zip
EsgynDB-ADO.NET-2.2.0.exe LICENSE NOTICE TFODBC64-2.2.0.exe TRAF_ODBC_Linux_Driver_64.tar.gz
[root@n09 clients]#
[root@n09 clients]#
[root@n09 clients]# tar xzf TRAF_ODBC_Linux_Driver_64.tar.gz
[root@n09 clients]#
[root@n09 clients]#
[root@n09 clients]# ls
DISCLAIMER jdbcT4-2.2.1.zip LICENSE_Esgyn odb64_linux.tar.gz TFODBC64-2.2.0.exe TRAF_ODBC_Linux_Driver_64.tar.gz
EsgynDB-ADO.NET-2.2.0.exe LICENSE NOTICE PkgTmp trafci.zip
[root@n09 clients]#
[root@n09 clients]#
[root@n09 clients]# cd PkgTmp/
[root@n09 PkgTmp]# ls
connect_test.cpp install.sh libicudata.so.44 libicuuc.so.44 libtrafodbc_l64_drvr.so libtrafodbc_l64.so license.txt MD5SUM runconnect_test.sh TRAFDSN
[root@n09 PkgTmp]#
[root@n09 PkgTmp]#
[root@n09 PkgTmp]# sh install.sh
Beginning Install of TRAFODBC Libraries
Verifying OS version
Architecture verified
Esgyn ODBC LICENSE AGREEMENT
NOTICE: You are not authorized to install or use this product unless you first
read, agree to, and confirm that the use of such product is subject to
a valid license agreement with Esgyn Corporation as stated below.
You confirm such license by installing this software. If you do not
have an existing license for the use of this product, you may not
access or use the product until you obtain the appropriate license
from Esgyn Corporation.
This ODBC driver software is provided subject to the terms of your existing
license agreement with Esgyn Corporation or its reseller, integrator,
distributor or other authorized sub-licensor for the use of Esgyn Corporation
software.
Do you accept the terms of the license (YES/NO): yes
Thank You....
Proceeding with install
ENTER a directory for library files
OR hit Enter to use the default [/usr/lib64] :
ENTER a directory for datasource template file
OR hit Enter to use the default [/etc/odbc] :
ENTER a directory for sample
OR hit Enter to use the default [/etc/odbc] :
TRAFODBC driver has successfully been installed.
* Library libtrafodbc_l64_drvr.so is installed on /usr/lib64
* data source template file TRAFDSN has been copied onto /etc/odbc
* sample file has been copied onto /etc/odbc
[root@n09 PkgTmp]#
4.追加/etc/odbc.ini
[ODBC]
traceFlags = ERROR
TraceStart = 0
TraceFile = tracefile.log
MaxTraceFileSize = 1024
AppUnicodeType=utf16
[traf]
Description = traf instance in IDC vm 10.10.11.3
Driver = Trafodion
Catalog = TRAFODION
Schema = QA
DataLang = 0
FetchBufferSize = SYSTEM_DEFAULT
Server = TCP:10.10.11.252:23400
SQL_ATTR_CONNECTION_TIMEOUT = SYSTEM_DEFAULT
SQL_LOGIN_TIMEOUT = SYSTEM_DEFAULT
SQL_QUERY_TIMEOUT = NO_TIMEOUT
ServiceName = HP_DEFAULT_SERVICE
ClientCharSet = UTF8
注:配置了一个名为traf的ODBC连接,Server为需要连接的DCS Master,ClientCharSet = UTF8这个是为了避免用odb导入带中文字符入表后不是乱码。
5. 添加/etc/odbcinst.ini
[Trafodion] Description = Trafodion ODBC Stand Alone Driver Driver = /usr/lib64/libtrafodbc_drvr64.so FileUsage = 1 UsageCount = 1 AppUnicodeType = utf16 Threading = 1
注意:ドライバのインストール場所がデフォルトの/usr/lib 64でない場合は、ドライバをインストールしたドライバライブラリの場所に変更します.
6.解凍処理中に実行する./runconnect_test.shスクリプトを使用して、構成が正しいかどうかを確認します.[trafodion@esgyn-01 PkgTmp]$ ./runconnect_test.sh In file included from sqlext.h:2071, from connect_test.cpp:27: sqlucode.h:20:20: error: sqlext.h: No such file or directory Using Connect String: DSN=Default_DataSource;UID=ss;PWD=ss; Connect Test Passed... [trafodion@esgyn-01 PkgTmp]$