With the expansion of the company's business, ntu general gbase8a database operations on our data proportion bigger and bigger, because had the big promotion compared the performance of the database before, the original database companies have also been done in migration gbase and rolled off the production line, all of our development also can only be completed in the new database, just have a python development requirements, studied the odbc data source configuration method of the gbase today, finally the connection is successful, do a note here, by the way,
Factory provide deployment package, first let me is red hat 7.6 environment, the installation package is as follows:
Libtool - LTDL - 2.2.6-15.5 RPM el6. X86_64.
UnixODBC 2.2.14-11. El6. X86_64. RPM
UnixODBC - devel - 2.2.14-11. El6. X86_64. RPM
Gbaseodbc 8.3.81.53-53.11 RPM x86_64.
Respectively by the RPM in sequence - the ivh XXXX. After completion of the RPM, can be in the/etc/odbcinst. See Gbase ini drive information,
The cat/etc/odbcinst. Ini
[GBase 8 a MPP Cluster ODBC Driver] 8.3
Driver=/usr/lib64/libgsodbc8. So
UsageCount
Then you can configure your own data source, configuration method is as follows:
In the/etc/odbc.ini add their own login to the database content, such as:
[test]
Driver=/usr/lib64/libgsodbc8. So
SERVER=10.10.1.101
UID=gbase
The PWD=XXXXX
PORT=5258
Where
The location of the drive is lib package,
IP SERVER is a database management node and multiple IP with a semicolon
UID login name
The PWD is the password to log in to your account
The PORT is the database PORT, default is 5258
After configuration is complete, as well as through isql command test validation
Isql -v test
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +
| Connected! |
| |
| - SQL statement |
| | help [tablename]
| quit |
| |
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +
SQL>
This time can test data sources through the python calls,