Informix write listener – Rest API setup issues

For 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

Tomcat Embed Core » 8.0.38

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.

 


SQL Server 2016, upgrading to compatability level 130,Trace flag 139 and additional one-off dbcc checks.

https://support.microsoft.com/en-gb/help/4010261/sql-server-2016-improvements-in-handling-some-data-types-and-uncommon-

When upgrading to SQL Server 2016 RTM CU3/SP1 and upgrading to database compatablity leve 130 there are additional DBCC checks which should be performed.

These are hidden behind Trace flag 139 which should be temporarily enabled as part of the process of changing database compability level to 130.

  • Enable trace flag 139 by running DBCC TRACEON(139, -1).
  • Run DBCC CHECKDB/TABLE..WITH EXTENDED_LOGICAL_CHECKS to validate persisted structures
  • Run DBCC CHECKCONSTRAINTS commands (if rows are affected the associated where clause to identify the row will be returned).
  • Disable trace flag 139 by running DBCC TRACEOFF(139, -1)
  • Change the database compatibility level to 130.
  • REBUILD any structures that you identified in step 1.

There are impovements to expression evaluation in database level 130 and this affects persisted structures

  • Check constraints
  • Persisted Computed columns
  • Indexes using computing columns whether as part of the key or as included columns
  • Filtered indexes
  • Indexed views

Upgrade to compatability level 130 BEFORE attempting to fix issues so the new expression evaluation logic is used for the fixed.

  • Check constraints – change data or drop/recreate constraint with new expression
  • Persisted Computed columns – Update a column referenced by the computed column to the same value to force recalcuation of the computed column
  • Index/filtered index/indexed views – Either A) Put db in single user mode and run DBCC CHECKTABLE with REPAIR_REBUILD B) ALTER INDEX…REBUILD and if supported in your edition of sql server consider adding the WITH (ONLINE=ON) clause.

NOTE: There are some queries in the Appendix C/D of the article above which can be used to help identify affected objects.


London BI/SQL Server user groups.

If you are BI based and want to meetup with other in London, whether technical or business based here as some contacts.

https://sqlserverfaq.com/ – General sql server (covers lots of usergroups)

http://sqllondon.pass.org/ – London SQL Pass Chapter for SQL Server but BI people do attend as well.

https://www.meetup.com/London-PUG/ London Power BI Users Group – they meet at Skills Matter, 10 South Place near Moorgate tube, big group, lots of people attend – 50+,

https://www.meetup.com/London-Business-Analytics-Group/ – London Business Analytics Group – Very power user/Business based, less technical


DB2 LUW Setting up Shadow Tables

Just heard someone at IDUG EMEA 2016 asking about how to setup DB2 LUW shadow tables.

This will depend upon DB2 Version,you also need a compatible CDC (Infosphere Replication) version,check via Finding System Requirements for IBM Software Products.

The steps are at http://www.smooth1.co.uk/db2/cancun.html#1.1

NOTE: This was written when the feature first came out DB2 LUW 10.5 FP4.

CDC Components to download were:

  • InfoSphere CDC for DB2 for LUW
  • InfoSphere CDC Access Server
  • InfoSphere CDC Management Console

Finding System Requirements for IBM Software Products.

IBM has a  Software Product Compatibility Reports facility.

http://www-969.ibm.com/software/reports/compatibility/clarity/softwareReqsForProduct.html


SQL Server on Linux notes from PASS Summit 2016

SQL Server on Linux notes from PASS Summit 2016

http://www.smooth1.co.uk/mssql/pass_summit_2016/sqlserveronlinux/SQLServerLinuxv1.htm


SSMS Running remotely

To run SSMS remotely:

runas /netonly /user:domain\username “C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe”

E.g.

runas /netonly /user:WIN-P9OQ9GF24HV\justdave “C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe”