Sunday, 24 July 2016

Sqoop – Tibero Integration


Version:

Sqoop  - 1.4.1

Tibero - 6


Tibero installation in UNIX system:

Prepare the following two files. (You can get trial edition in http://www.tmaxsoft.com/)
·        Binary executable file (tar.gz)
·        License file (license.xml)

Extract the tar:

tar -xvf tibero5-bin-5_rel_FS05-linux64-127068-opt-tested.tar.gz
Create a folder ‘license’ in the tibero home and copy the license.xml

Execute the following:

./Tibero_6_FS04_linux6420160418.bin
Check that the environment variables are properly set in the environment configuration files (.bashrc, .bash_profile, .profile, etc.) for each user account for each OS. Sample given below:
#Created by Tibero Installer. You should manually delete below variables for uninstall.
export TB_HOME=/root/TmaxData/tibero6
export TB_SID=tibero
export PATH=/usr/xpg4/bin:/usr/xpg4/bin:/sbin:/bin:/usr/sbin:/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/root/TmaxData/tibero6/bin:/root/TmaxData/tibero6/client/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/root/TmaxData/tibero6/bin:/root/TmaxData/tibero6/client/bin
export LD_LIBRARY_PATH=/root/TmaxData/tibero6/lib:/root/TmaxData/tibero6/client/lib
###############################################################################

 

Execute the following command in $TB_HOME/config.

./gen_tip.sh

 

Start the database in ‘NOMOUNT’ mode from $TB_HOME:

bin/tbboot nomount

Create a database using the CREATE DATABASE statement. (Very basic)

create database "tibero"
  user sys identified by tibero;

Restart Tibero using the tbboot command.

Execute system.sh command in $TB_HOME/scripts to execute the SQL file in the current directory. (The default passwords for the sys and syscat account are tibero and syscat, respectively.)

Start the tibero database client:

client/bin/tbsql sys/tibero

 

Checking the tibero services

[root@c51-3 ~]# ps -ef | grep tbsvr
root     28167     1  0 Jul18 ?        00:04:10 tbsvr          -t NORMAL -SVR_SID tibero
root     28169 28167  0 Jul18 ?        00:00:00 tbsvr_TBMP     -t NORMAL -SVR_SID tibero
root     28170 28167  0 Jul18 ?        00:00:00 tbsvr_WP000    -t NORMAL -SVR_SID tibero
root     28171 28167  0 Jul18 ?        00:00:00 tbsvr_WP001    -t NORMAL -SVR_SID tibero
root     28172 28167  0 Jul18 ?        00:39:37 tbsvr_AGNT     -t NORMAL -SVR_SID tibero
root     28173 28167  0 Jul18 ?        00:10:02 tbsvr_DBWR     -t NORMAL -SVR_SID tibero
root     28174 28167  0 Jul18 ?        00:00:00 tbsvr_RECO     -t NORMAL -SVR_SID tibero
root     31398 17165  0 22:39 pts/1    00:00:00 grep tbsvr

Integrating Sqoop

Copy tibero6-jdbc-14.jar to /opt/mapr/sqoop/sqoop-1.4.6/lib/

Importing data from Tibero:


sqoop import --driver com.tmax.tibero.jdbc.TbDriver --connect jdbc:tibero:thin:@localhost:8629:tibero --username sys --password tibero --table emp -m 1;

No comments:

Post a Comment