Informix write listener – Rest API setup issues
Posted: April 25, 2017 Filed under: Informix, Informix 12, Informix wire listener | Tags: Informix, Informix 12, Informix wire listener Leave a commentFor my talk at IIUG 2017 I was working with the wire listener on Informix.
When setting up a wire listener for the REST API I found some Informix packaging issues and issues with the DeveloperWorks article.
I was following the developerWorks article Informix and NoSQL: First Steps with the REST API
NOTE: This series of articles REALLY helped when getting my talk ready!
I was working with the latest Informix server version 12.10.FC8 on CentOS 7 and found:
a) When unpacking nosql_sdk.zip this unpacks to folder nosql-sdk-1.2.2 – there was no explict step with the command to add a link called nosql_sdk to make the examples work, I add this below.
cd $INFORMIXDIR
unzip bin/nosql_sdk.zip
ln -s nosql-sdk-1.2.2 nosql_sdk
b) The library ${INFORMIXDIR}/nosql_sdk/tomcat-embed-core.jar is missing!
Noticing that the other libaries were for version 8.0.38 I went to
and on the “Files” line clicked the download link.
I then copied tomcat-embed-core-8.0.38.jar into $INFORMIXDIR/nosql_sdk/lib
and added this to the classpath.
3. In order to get class com.ibm.nosql.server.ListenerCLI I also had to add ${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar to the classpath.
The final result was:
cat rest_listener_start.sh
#!/bin/sh
${INFORMIXDIR}/extend/krakatoa/jre/bin/java \
-cp ${INFORMIXDIR}/bin/jsonListener.jar:${INFORMIXDIR}/nosql_sdk/lib/tomcat-embed-core-8.0.38.jar:${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar \
com.ibm.nosql.server.ListenerCLI \
-config ${INFORMIXDIR}/etc/restListener.properties \
-logfile /work/martinfu/731/restListener.log \
-start &
exit
cat rest_listener_stop.sh
#!/bin/sh
${INFORMIXDIR}/extend/krakatoa/jre/bin/java \
-cp ${INFORMIXDIR}/bin/jsonListener.jar:${INFORMIXDIR}/nosql_sdk/lib/tomcat-embed-core-8.0.38.jar:${INFORMIXDIR}/nosql_sdk/com.ibm.nosql.informix-1.2.2.jar \
com.ibm.nosql.server.ListenerCLI \
-config ${INFORMIXDIR}/etc/restListener.properties \
-stop
exit
I hope this helps and am talking to IBM about the issues I found.
Finding System Requirements for IBM Software Products.
Posted: November 14, 2016 Filed under: DB2 LUW, Informix | Tags: DB2 LUW, Informix Leave a commentIBM has a Software Product Compatibility Reports facility.
http://www-969.ibm.com/software/reports/compatibility/clarity/softwareReqsForProduct.html
Managing GSKit Master Keys
Posted: May 2, 2015 Filed under: DB2 LUW, Informix | Tags: DB2 LUW, Informix Leave a commenthttp://www.ibm.com/developerworks/data/library/techarticle/dm-1504-master-encrypted-keys/index.html
Managing GSKit Master Keys
Huge Pages for Informix on SPARC Solaris
Posted: April 30, 2015 Filed under: Informix, Solaris | Tags: Informix, Solaris Leave a commentTo get hugh pages for Informix on Solaris
1. Set RESIDENT to a value other than 0, >0 means the first N shared memory segments will be pinned in memory.
https://informixdba.wordpress.com/2013/03/08/huge-pages/
2. Make sure IFX_LARGE_PAGES is not set to 0.
http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqlr.doc/ids_sqr_404.htm
3. To get pages >4MB in size the hardware must have support for 2GB pages, run pagesize -a to check what the hardware supports
https://blogs.oracle.com/mandalika/entry/enabling_2_gb_large_pages
4, Either use ppgsz or mpss.so.1
The three ways to change the default page size for an application are:
- Use the Oracle Solaris OS command ppgsz(1).
- Compile the application with the -xpagesize, -xpagesize_heap, and -xpagesize_stack options. See the compiler man pages for details.
- Use MPSS specific environment variables. See the mpss.so.1(1) man page for details.
http://docs.oracle.com/cd/E24457_01/html/E21996/aewda.html
ppgsz is documented at
https://docs.oracle.com/cd/E19683-01/816-0210/6m6nb7mht/index.html
mpss.so.1 is documented at
http://docs.oracle.com/cd/E19253-01/816-5165/6mbb0m9lf/index.html
5. Note
“Solaris has had large parges for many years. Initially, a large page on SPARC was 4MB. Then, much later, Solaris 9 added new APIs for Multiple Page Size Support. At that time, the maximum supported by hardware was 256MB. Today, the T4 processor supports page sizes up to 2GB.”
https://www.linkedin.com/groups/Solaris-Huge-pages-60651.S.78812448
6. UltraSPARC II/III/III+/IV/IV+ and UltraSPARC T1 (aka Niagara) only support large pages of 4MB
7. Check none of these to disable large pages are being used
https://blogs.oracle.com/mandalika/entry/solaris_disabling_out_of_the
set exec_lpg_disable = 1
This parameter prevents large pages from being used when the kernel is allocating memory for processes being executed. These constitute the memory needed for a processes’ text/data/bss.set use_brk_lpg = 0
This parameter prevents large pages from being used for heap. To enable large pages for heap, set the value of this parameter to 1 or remove this parameter from/etc/system
completely.Note:
brk()
is the kernel routine that is called whenever a user level application invokesmalloc()
.set use_stk_lpg = 0
This parameter disables the large pages for stack. Set it to 1 to retain the default functionality.set use_zmap_lpg = 0
This variable controls the size of anonymous (anon
) pages.set use_text_pgsz4m = 0
This tunable disables the default use of 4M text pages on UltraSPARC-III/III+/IV/IV+/T1 platforms.set use_text_pgsz64k = 0
This tunable disables the default use of 64K text pages on UltraSPARC-T1 (Niagara) platform.set use_initdata_pgsz64k = 0
This tunable disables the default use of 64K data pages on UltraSPARC-T1 (Niagara) platform.
8.The T4 processor was the first to add “Support for a much larger Memory Management Unit page size (2GB)”
https://blogs.oracle.com/mandalika/entry/enabling_2_gb_large_pages
“Prerequisites:
OS: Solaris 10 8/11 (Update 10) or later
Hardware: SPARC T4. eg., SPARC T4-1, T4-2 or T4-4”
Informix Chat with Lab
Posted: April 26, 2015 Filed under: Informix | Tags: Informix Leave a commentInformix Chat with the Lab
Simple Informix C UDR on Centos 6.6
Posted: April 26, 2015 Filed under: Informix, Informix 12 | Tags: Informix, Informix 12 Leave a commentSimple Informix C UDR on Centos 6.
#include "dmi/mi.h" mi_integer bigger_int(mi_integer left,mi_integer right) { if ( left > right ) return(left); else return(right); }
To compile
gcc -I$INFORMIXDIR/incl -I $INFORMIXDIR/incl/esql -c -fPIC -DMI_SERVBUILD -g bigger_int.c gcc -shared -fPIC -o /home/informix/bigger_int.so bigger_int.o
To load and run
dbaccess sysmaster create database justdave; CREATE FUNCTION bigger_int (arg1 integer, arg2 integer) RETURNING integer EXTERNAL NAME '/home/informix/bigger_int.so(bigger_int)' LANGUAGE C; select bigger_int(1,2) from systables where tabid=1; DROP FUNCTION bigger_int;
Only when you execute the function is the shared library loaded
05:20:41 Loading Module
05:20:41 pid 3217: ELF .eh_frame section missing in /opt/IDS.12.10.FC5/gls/dll/64-libicudata.so.48
05:20:41 The C Language Module loaded
Informix Client SDK support position
Posted: March 31, 2015 Filed under: Informix | Tags: Informix Leave a commentInformix Client SDK support position