Suse 64 – ZTACS Limited http://ztacs.com Tue, 19 Dec 2017 11:06:10 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.3 http://ztacs.com/wp-content/uploads/2018/03/cropped-ztacs_logo.fw_-32x32.png Suse 64 – ZTACS Limited http://ztacs.com 32 32 Install and configure ODBC Drivers on Linux – SLES http://ztacs.com/install-and-configure-odbc-drivers-on-linux-sles/ Tue, 19 Dec 2017 11:06:10 +0000 http://www.solutioning.eu/?p=982 We ran into this issue that the proper MS SQL drivers for SLES/PHP are unavailable. There is no phpX-mssql package on the official development media to install, therefore we had to find an alternative solution to access and write data into an MS SQL database from our SLES server.

After some research we decided to set up ODBC on SLES to see if that is working. You need to follow the steps below to install and enable ODBC on your SLES Linux Server.

Install the odbc driver packages from the official SLES 11 Media using zypper.If you do not have a compiler installed also install gcc.

zypper install unixODBC unixODBC-devel gcc

Since there is no freetds package available on the installation media we need to compile that ourselves. Download the installation media from http://www.freetds.org/, upload it to your server and unpack it to a location of your choice. Run the following commands from the directory where you unpacked freedts.

./configure
 make
 make install

Now edit the tds configuration file called freetds.conf. Located in /usr/local/etc/ and add the following to the end of the file end of the file and modify the host, port and version number to your requirements.

[sql-server]
 host = 192.168.0.105
 port = 1433
 tds version = 7.0

Now test if you can connect to the database server. Make sure that the server listens on port 1433 and you have the relevant user id and password.

tsql -S sql-server -U sa -P ********
 locale is "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C"
 locale charset is "UTF-8"
 using default charset "UTF-8"
 1>

If you do not see any error messages at this stage your connection is working. The next step is to modify the odbc configuration files. First we will do the drivers file. Edit the /etc/unixODBC/odbcinst.ini file by adding the following:

[sql-server]
Description = TDS Connection
Driver = /usr/local/lib/libtdsodbc.so
Setup = /usr/lib64/unixODBC/libtdsS.so
UsageCount = 1
FileUsage = 1

The libtdsodbc.so and libtdsS.so files might be on a different location on your installation check them before you add the lines.

The last step is to add the server information into the odbc.ini file which is located also in /etc/unixODBC directory. Add the following and modify the database name and port if required.

[DsPcDb]
Description = odbc test driver
Driver = sql-server
Servername = sql-server
Database = DsPcDb
UID = sa
Port = 1433

Now run isql to check if your configuration is correct. You have to use the name of the odbc connection after the isql command. In our case this was DsPcDb.

HUITM001-P1:/etc/unixODBC # isql DsPcDb sa *********
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>

If you see the “Connected!” state your setup was successful.

]]>
malloc(): memory corruption at DB2 installation on CentOS or Suse Linux http://ztacs.com/malloc-memory-corruption-at-db2-installation-on-centos-or-suse-linux/ Thu, 15 Oct 2015 12:19:27 +0000 http://www.solutioning.eu/?p=836 I spent quite a few hours to figure out what caused this error message. This appeared when I started db2setup on either OpenSUSE or CentOS. The error refers to a memory leak when in reality it is related to the location of the installer.

  • if the installer is located on a mounted filesystem this problem occurs.
  • If I copy the installation bundle locally to the server and kick off the installation from there it works without an error.

So before you go any further try copying the installation images locally to the server and see if it solves the issue.

The error message I got is shown below:

# ./db2setup
DBI1190I  db2setup is preparing the DB2 Setup wizard which will guide
you through the program setup process. Please wait.

*** Error in `/tmp/db2.tmp.12752/db2/linuxamd64/install/../java/jre/bin/java’: malloc(): memory corruption: 0x00007fbbe0b142b0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libstdc++.so.6(_Znwm+0x1d)[0x7fbbcc7620ad]
./libdb2ure.so(_ZN7UREInfo12setMsgTokensEPK14MsgTokenHolder+0x33)[0x7fbbcc146443]
./libdb2ure.so(_ZN7UREInfo9setVitalsEiPKciliP14MsgTokenHolderji+0x85)[0x7fbbcc146375]
./libdb2ure.so(_ZN7UREInfoC1EiPKciliP14MsgTokenHolderji+0x6b)[0x7fbbcc14665b]
./libdb2ure.so(_Z11ureSendInfoiPKciiiP14MsgTokenHolderij+0x43)[0x7fbbcc10d1e3]
./libdb2ure.so(_ZN11GPFSFileset9initLevelEbPcb+0xa4e)[0x7fbbcc28305e]
./libdb2ure.so(_ZN11GPFSFileset8initSpecEb+0x204)[0x7fbbcc283ea4]
./libdb2ure.so(_ZN11GPFSFileset12setInstalledEv+0x35)[0x7fbbcc27d5e5]
./libdb2ure.so(_ZN11FilesetList18setExternInstalledEv+0x82)[0x7fbbcc274e52]
./libdb2ure.so(_ZN14FilesetUtility10scanSystemEv+0x2fb)[0x7fbbcc26104b]
./libdb2ure.so(_ZN11FilesetList4initEv+0x338)[0x7fbbcc27ac98]
./libdb2ure.so(_ZN11FilesetList11getInstanceEv+0x139)[0x7fbbcc2780e9]
./libdb2ure.so(_Z14PIResetAllOnCDv+0xb)[0x7fbbcc26d04b]
./libdb2ure.so(_ZN14FilesetUtility9scanMediaEPKc+0x544)[0x7fbbcc263474]
./libdb2ure.so(_ZN14FilesetUtility13getImgVersionEv+0x33)[0x7fbbcc265dc3]
./libdb2ure.so(Java_com_ibm_db2_install_core_DB2Copy_getInstalledDB2CopyObjsNative+0x41)[0x7fbbcc1cf651]
/tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/default/libj9vm26.so(+0x33070)[0x7fbbe480b070]
======= Memory map: ========
00010000-00011000 rw-p 00000000 00:00 0
00400000-00401000 r-xp 00000000 fd:00 67754603                           /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/bin/java
00500000-00501000 rw-p 00000000 fd:00 67754603                           /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/bin/java
021c4000-021e5000 rw-p 00000000 00:00 0                                  [heap]
7fbbac000000-7fbbac0fc000 rw-p 00000000 00:00 0
7fbbac0fc000-7fbbb0000000 —p 00000000 00:00 0
7fbbb0000000-7fbbb008f000 rw-p 00000000 00:00 0
7fbbb008f000-7fbbb4000000 —p 00000000 00:00 0
7fbbb4000000-7fbbb4021000 rw-p 00000000 00:00 0
7fbbb4021000-7fbbb8000000 —p 00000000 00:00 0
7fbbb8000000-7fbbb8021000 rw-p 00000000 00:00 0
7fbbb8021000-7fbbbc000000 —p 00000000 00:00 0
7fbbbd51b000-7fbbbd523000 r-xp 00000000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd523000-7fbbbd722000 —p 00008000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd722000-7fbbbd723000 r–p 00007000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd723000-7fbbbd724000 rw-p 00008000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd724000-7fbbbd725000 —p 00000000 00:00 0
7fbbbd725000-7fbbbd765000 rw-p 00000000 00:00 0                          [stack:18095]
7fbbbd765000-7fbbbd7bb000 r-xp 00000000 fd:00 135555513                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libsplashscreen.so
7fbbbd7bb000-7fbbbd8bb000 —p 00056000 fd:00 135555513                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libsplashscreen.so
7fbbbd8bb000-7fbbbd8bc000 rw-p 00056000 fd:00 135555513                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libsplashscreen.so
7fbbbd8bc000-7fbbbd8bf000 rw-p 00000000 00:00 0
7fbbbd8bf000-7fbbbd8f2000 r-xp 00000000 fd:00 135555509                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libjpeg.so
7fbbbd8f2000-7fbbbd9f2000 —p 00033000 fd:00 135555509                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libjpeg.so
7fbbbd9f2000-7fbbbd9f3000 rw-p 00033000 fd:00 135555509                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libjpeg.so
7fbbbd9f3000-7fbbbda09000 r-xp 00000000 fd:00 135555530                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnet.so
7fbbbda09000-7fbbbdb09000 —p 00016000 fd:00 135555530                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnet.so
7fbbbdb09000-7fbbbdb0a000 rw-p 00016000 fd:00 135555530                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnet.so
7fbbbdb0a000-7fbbbdb1a000 r-xp 00000000 fd:00 135555500                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnio.so
7fbbbdb1a000-7fbbbdc19000 —p 00010000 fd:00 135555500                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnio.so
7fbbbdc19000-7fbbbdc1a000 rw-p 0000f000 fd:00 135555500                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnio.so
7fbbbdc1a000-7fbbbdc1b000 —p 00000000 00:00 0
7fbbbdc1b000-7fbbbdc5b000 rw-p 00000000 00:00 0                          [stack:18094]
7fbbbdc5b000-7fbbbdc5c000 —p 00000000 00:00 0
7fbbbdc5c000-7fbbbdc9c000 rw-p 00000000 00:00 0                          [stack:18081]
7fbbbdc9c000-7fbbbdc9d000 —p 00000000 00:00 0
7fbbbdc9d000-7fbbbdcdd000 rw-p 00000000 00:00 0                          [stack:18080]
7fbbbdcdd000-7fbbbdcde000 —p 00000000 00:00 0
7fbbbdcde000-7fbbbdd1e000 rw-p 00000000 00:00 0                          [stack:18079]
7fbbbdd1e000-7fbbbdd23000 r-xp 00000000 fd:00 136347703                  /usr/lib64/libXfixes.so.3.1.0
7fbbbdd23000-7fbbbdf22000 —p 00005000 fd:00 136347703                  /usr/lib64/libXfixes.so.3.1.0
7fbbbdf22000-7fbbbdf23000 r–p 00004000 fd:00 136347703                  /usr/lib64/libXfixes.so.3.1.0
7fbbbdf23000-7fbbbdf24000 rw-p 00005000 fd:00 136347703                  /usr/lib64/libXfixes.so.3.1.0
7fbbbdf24000-7fbbbdf2e000 r-xp 00000000 fd:00 136347751                  /usr/lib64/libXcursor.so.1.0.2
7fbbbdf2e000-7fbbbe12d000 —p 0000a000 fd:00 136347751                  /usr/lib64/libXcursor.so.1.0.2
7fbbbe12d000-7fbbbe12e000 r–p 00009000 fd:00 136347751                  /usr/lib64/libXcursor.so.1.0.2
7fbbbe12e000-7fbbbe12f000 rw-p 0000a000 fd:00 136347751                  /usr/lib64/libXcursor.so.1.0.2
7fbbbe12f000-7fbbbe131000 r-xp 00000000 fd:00 134400335                  /usr/lib64/libfreebl3.so
7fbbbe131000-7fbbbe330000 —p 00002000 fd:00 134400335                  /usr/lib64/libfreebl3.so*** Error in `/tmp/db2.tmp.12752/db2/linuxamd64/install/../java/jre/bin/java’: malloc(): memory corruption: 0x00007fbbe0b142b0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fbbe58a717a]
/lib64/libc.so.6(+0x75d66)[0x7fbbe582cd66]
/lib64/libc.so.6(+0x7ebbc)[0x7fbbe5835bbc]
/lib64/libc.so.6(__libc_malloc+0x5c)[0x7fbbe583718c]
/lib64/libc.so.6(open_memstream+0x1a)[0x7fbbe582b99a]
======= Memory map: ========
00010000-00011000 rw-p 00000000 00:00 0
00400000-00401000 r-xp 00000000 fd:00 67754603                           /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/bin/java
00500000-00501000 rw-p 00000000 fd:00 67754603                           /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/bin/java
021c4000-021e5000 rw-p 00000000 00:00 0                                  [heap]
7fbbac000000-7fbbac0fc000 rw-p 00000000 00:00 0
7fbbac0fc000-7fbbb0000000 —p 00000000 00:00 0
7fbbb0000000-7fbbb008f000 rw-p 00000000 00:00 0
7fbbb008f000-7fbbb4000000 —p 00000000 00:00 0
7fbbb4000000-7fbbb4021000 rw-p 00000000 00:00 0
7fbbb4021000-7fbbb8000000 —p 00000000 00:00 0
7fbbb8000000-7fbbb8021000 rw-p 00000000 00:00 0
7fbbb8021000-7fbbbc000000 —p 00000000 00:00 0
7fbbbd51b000-7fbbbd523000 r-xp 00000000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd523000-7fbbbd722000 —p 00008000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd722000-7fbbbd723000 r–p 00007000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd723000-7fbbbd724000 rw-p 00008000 fd:00 135419944                  /usr/lib64/libnss_sss.so.2
7fbbbd724000-7fbbbd725000 —p 00000000 00:00 0
7fbbbd725000-7fbbbd765000 rw-p 00000000 00:00 0                          [stack:18095]
7fbbbd765000-7fbbbd7bb000 r-xp 00000000 fd:00 135555513                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libsplashscreen.so
7fbbbd7bb000-7fbbbd8bb000 —p 00056000 fd:00 135555513                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libsplashscreen.so
7fbbbd8bb000-7fbbbd8bc000 rw-p 00056000 fd:00 135555513                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libsplashscreen.so
7fbbbd8bc000-7fbbbd8bf000 rw-p 00000000 00:00 0
7fbbbd8bf000-7fbbbd8f2000 r-xp 00000000 fd:00 135555509                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libjpeg.so
7fbbbd8f2000-7fbbbd9f2000 —p 00033000 fd:00 135555509                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libjpeg.so
7fbbbd9f2000-7fbbbd9f3000 rw-p 00033000 fd:00 135555509                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libjpeg.so
7fbbbd9f3000-7fbbbda09000 r-xp 00000000 fd:00 135555530                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnet.so
7fbbbda09000-7fbbbdb09000 —p 00016000 fd:00 135555530                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnet.so
7fbbbdb09000-7fbbbdb0a000 rw-p 00016000 fd:00 135555530                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnet.so
7fbbbdb0a000-7fbbbdb1a000 r-xp 00000000 fd:00 135555500                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnio.so
7fbbbdb1a000-7fbbbdc19000 —p 00010000 fd:00 135555500                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnio.so
7fbbbdc19000-7fbbbdc1a000 rw-p 0000f000 fd:00 135555500                  /tmp/db2.tmp.12752/db2/linuxamd64/java/jre/lib/amd64/libnio.so
7fbbbdc1a000-7fbbbdc1b000 —p 00000000 00:00 0
7fbbbdc1b000-7fbbbdc5b000 rw-p 00000000 00:00 0                          [stack:18094]
/tmp/db2.tmp.12752/db2/linuxamd64/install//db2setup_exec: line 592: 18068 Aborted                 (core dumped) ${DB2INSTALLER?} ${DB2OPTS?} 2> ${ERRFILE?}

]]>