DB2 Cancun (10.5 Fixpack 4) New Features - 14 November 2014 03:33
- 1. Column-organized tables enhancements
- 1.1. Shadow tables
- 1.2. Merge supported for column organized tables
- 1.3. Common table expression improvements for column organized tables
- 1.4. Alter table add column for column organized tables
- 1.5. Synopsis tables can now include CHAR and VARCHAR columns
- 1.6. Adaptive Page-level compression for insert/import/ingest operations is now enabled by default
- 1.7. Index access for SELECT statements that are executed with the cursor stability (CS) isolation level is now supported
- 1.8. You can now create column-organized user-maintained materialized query tables (MQTs).
- 1.9. Failed conversion from row to column organized can now be cancelled.
- 1.10. On AIX operating systems, the automatic NUMA awareness that is provided by setting the DB2_RESOURCE_POLICY registry variable to AUTOMATIC is enhanced.
- 1.11. DECFLOAT is now supported as a column type on column-organized tables.
- 1.12. SQL Compatibility features provided by the DB2_COMPATIBILITY_VECTOR registry variable are now available for column-organized tables.
- 2. HADR enhancements
- 2.1. HADR databases now support column-organized tables.
- 2.2. If you are using Internet Protocol version 6 (IPV6) adapters, you can now configure HADR with the db2haicu command.
- 2.3. Three new monitoring fields are added to the db2pd command and the MON_GET_HADR table function.
- 3. pureScale enhancements
- 3.1. DB2 pureScale Feature on a Transmission Control Protocol/Internet Protocol over Ethernet (TCP/IP) network without special remote direct memory access (RDMA) capable adapters.
- 3.2. A geographically dispersed DB2 pureScale cluster (GDPC) environment is extended to support a remote direct memory access (RDMA) over Converged Ethernet (RoCE) network.
- 3.3. On supported Linux operating systems, a DB2 pureScale environment can now be run on a set of virtual machines.
- 3.4. Purescale backup and recovery operations are extended to include incremental backups.
- 3.5. In a DB2 pureScale environment, the DB2 Spatial Extender is now supported.
- 3.6. When applying a fix pack in a DB2 pureScale environment, if GPFS™, Tivoli SA MP, or RSCT were already manually installed or updated manually, you can force the installFixPack command to overwrite the already installed version.
- 3.7. Inplace (online) table reorganization is now supported in a DB2 pureScale environment..
- 3.8. Federated two-phase commit is now supported in a DB2 pureScale environment.
- 3.9. Purescale - a new db2iupgrade parameter, -g, upgrades all the members and cluster caching facilities (CFs) at the same time, in parallel.
- 4. SQL compatibility enhancement and multicultural support enhancement
- 4.1. Handling of multibyte characters in character and graphic string data types is improved by allowing data type lengths to be specified as a number of string units.
- 4.2. For successfully matching SQL statements, three new inexact statement matching rules are now supported.
- 5. Monitoring enhancements
- 5.1. New monitor elements monitor the use of sort heap memory to help you with its sizing and allocation.
- 5.2. New monitor elements assist with aggregation of package cache monitor data and detection of plan changes.
- 5.3. New monitor elements identify statements in the package cache that had a suboptimal compilation.
- 5.4. The new built-in routine MON_GET_SECTION helps to retrieve and store a copy of the executable section for further investigation.
- 5.5. The new built-in routine MON_GET_SECTION_OBJECT helps to identify sections that access an object or set of objects, and helps explore which objects a section depends on.
- 6. Application interface enhancements
- 6.1. The CLI driver that is included with this fix pack contains several enhancements.
- 6.2. The IBM Data Server Provider for .NET that is included with this fix pack contains several enhancements.
- 6.3. Use of array variables in INSERT, UPDATE, and DELETE statements are supported by embedded SQL applications.
- 6.4. You can skip local code page conversion for the graphic data types in embedded SQL application with the SkipLocalCPConversionForWcharConvert IBM data server driver configuration keyword.
- 6.5. JSON (Java™ Script Object Notation) DB2 NoSQL capabilities are enhanced with new security features, new flexible data types for the _ID field, capped collections, new aggregate functions, and better control through various administration changes.
- 7. Other miscellaneous enhancements
- 7.1. On supported Linux and AIX operating systems, a non-root installation of DB2 database server product supports thin server instance environment.
- 7.2. The db2look command supports two new parameters -createdb and -printdbcfg.
- 7.3. You can now obtain the details of all statement handles that were allocated by the CLI driver prior to enabling a DB2 trace.
- 7.4. You can now format the DB2 trace that is taken with the -cli option to a directory, where separate trace files are created for each thread id in a process.
- 7.5. The db2cli command adds a -displaylic option to display license information.
- 7.6. The db2cli command allows testing the connection to DB2 for z/OS or DB2 for i server with the server-side DB2 connect license when the -useserverlic option is specified.
- 7.7. The db2cli command allows testing the data source name (DSN) connection with the ODBC driver manager when the -odbcdsn option is specified..
- 7.8. The db2audit command has been enhanced with a new syslog parameter.
- 7.9. Additional EXPLAIN arguments are now supported.
- 7.10. Enhanced encryption is now possible with the adherence to NIST SP 800-131A.
- 7.11. You can now ensure that all database backups are always encrypted.
- 7.12. The performance of SQL Procedural Language (SQL PL) and SQL/PL language execution has been enhanced.
- 7.13. Additional operating systems are supported.
- 7.14. Translation from DB2 Information Centre to IBM Knowledge Centre is complete.
This is against instance db2inst2 first setup parameters for shadow tables
- db2set DB2_WORKLOAD=ANALYTICS
- db2 create database justdave
- db2 connect to justdave
- db2set DB2_EXTENDED_OPTIMIZATION=OPT_SORTHEAP_EXCEPT_COL
- We already have dbm cfg INSTANCE_MEMORY=AUTOMATIC and dbm cfg SHEAPTHRES = 0
- We should use a tablespace with 32K pagesize and an extent size of 4 pages
- We already have DFT_TABLE_ORG ROW,DATABASE_MEMORY AUTOMATIC,DB_MEM_THRESH 100
- db2 update db cfg for justdave using SORTHEAP 100000 SHEAPTHRES_SHR 300000
- db2 update db cfg for justdave using catalogcache_sz 330
- db2 update db cfg for justdave using util_heap_sz 100000 AUTOMATIC
- db2 update dbm cfg using intra_parallel YES
- mkdir /home/db2inst1/logs
- db2 update db cfg for justdave using logarchmeth1 DISK:/home/db2inst1/logs
- db2 terminate
- db2stop
- db2start
- db2 attach to db2inst1
- db2 backup db justdave
- This now requires installation of the IBM InfoSphere Change Data Capture software
Download CDC Components as per
Installation requirements for IBM InfoSphere Change Data Capture for shadow tables
Preparation checklist
- db2 instance name - db2inst1
- db2 instance dir - /home/db2inst1/sqllib
- db2 database name - justdave
- db2 metadata schema name - justdave1
- db2 instance owner - db2inst1
- db2 cdc user - db2cdc1
- db2 cdc user group - db2cdcg1
- cdc installation archive name - IIDR_1021_InterimFix15_Linuxx86_DB2LUW_for_all_licenses.zip
- cdc installation binary name - setup-cdc-linux-x86-db2luw.bin
- cdc server - db2inst1
- cdc user - cdcusr1 - must have access to /home/db2inst1/sqllib/db2inst1/NODE0000/sqldbdir
- cdc user group - cdcgrp1
- cdc user home dir - /home/cdcusr1
- cdc installation dir - /opt/IBM/InfoSphereChangeDataCapture/ReplicationEngineforIBMDB2
- cdc instance name - cdc1
- cdc port - 60500
- cdc staging store size - 1
- cdc max instance memory - 1024
- cdc bit version - 64
- cdc refresh loader path - /home/db2inst1/refresh
- cdc refresh load backup path - /home/db2inst1/refreshbkup
- cdc acceptable latency in seconds - 5
- access server installation archive name - IIDR_1021_InterimFix8_Linuxx86_AccessServer_for_all_licenses.zip
- access server installation binary name -
- access server installation directory - /opt/IBM/InfoSphereChangeDataCapture/AccessServer
- access server host - centos2.localdomain
- access server port - 60600
- access server user - cdcacc1
- access server data store name - accdat1
- managment console installation archive name - IIDR_1021_InterimFix8_Windows_ManagementConsole_for_all_licenses.zip
- managment console installation binary name -
- managment console installation directory - C:\Program Files\IBM\InfoSphere\Change Data Capture\Management Console
- managment console workstation - WIN-ME2GJBUCD7S (VM Win2012R2-2)
Add cdc users
- groupadd cdcgrp1
- useradd -d /home/cdcusr1 -g cdcgrp1 -m cdcusr1
- passwd cdcusr1
- groupadd db2cdcg1
- useradd -d /home/db2cdc1 -g db2cdcg1 -m db2cdc1
- passwd db2cdc1
- su - db2inst1
- db2 connect to justdave
- db2 create schema justdave1
- db2 grant connect,load on database to user db2cdc1
- db2 grant dbadm,createtab,bindadd,connect,create_not_fenced_routine,implicit_schema,load,create_external_routine,quiesce_connect,secadm on database to user db2cdc1
- db2 grant createin,dropin,alterin on schema justdave1 to user db2cdc1
- mkdir /home/db2inst1/refresh
- chmod 777 /home/db2inst1/refresh
Install Access Server
- Login to access server host
- chmod 777 /opt
- su - cdcusr1
- mkdir /tmp/x1; cd /tmp/x1
- unzip /mnt/hgfs/cache/db2/IIDR_1021_InterimFix8_Linuxx86_AccessServer_for_all_licenses.zip
- sh ./cdcaccess-10.2.1_Interim_Fix_8-2246-linux-x86-setup.bin
- Enter to continue
- Enter 1 to accept license agreement
- Enter port 60600
- Enter to accept default installation path
- Enter to accept Pre Installation Summary
Post installation message
Before you connect to this Access Server installation, you must start Access
Server and create the administration user account. See the installation guide
for more information. You should also install the equivalent version of IBM
InfoSphere Change Data Capture Management Console, if you haven't already done
so, before connecting to Access Server.
Press Enter to exit the installer
Start the Access Server
cd /opt/IBM/InfoSphereChangeDataCapture/AccessServer/bin
nohup ./dmaccessserver &
Install Infosphere CDC for DB2 LUW
- cd;rm -rf /tmp/x1;mkdir /tmp/x1;cd /tmp/x1
- unzip /mnt/hgfs/cache/db2/IIDRCDC_10.2.1_DB2_Lnx_x86.zip
- sh IIDR_1021_DB2LUW/setup-cdc-linux-x86-db2luw.bin
- Enter to continue
- Enter 1 to accept license agreement
- Enter to accept default installation path
- Enter to accept Pre Installation Summary
- Enter 2 to NOT launch the configuration tool
Install Interim Fix for Infosphere CDC for DB2 LUW
- cd;rm -rf /tmp/x1;mkdir /tmp/x1;cd /tmp/x1
- unzip /mnt/hgfs/cache/db2/IIDR_1021_InterimFix15_Linuxx86_DB2LUW_for_all_licenses.zip
- sh ./setup-1021-InterimFix15-linux-x86-db2luw.bin
- Enter to continue
- Enter to accept default installation path
- Press Enter to upgrade existing installation
- Enter 1 to accept license agreement
- Enter to accept Pre Installation Summary
- Enter 2 to NOT launch the configuration tool
Install InfoSphere CDC Management Console
- Login to WIN-ME2GJBUCD7S (VM Win2012R2-2) as Administrator
- Unpack zip file to local folder and run cdcmc-10.2.1_Interim_Fix_8-2246-setup
Configure InfoSphere CDC software for shadow tables
- As cdcusr1 on Linux
- cd /opt/IBM/InfoSphereChangeDataCapture/AccessServer/bin
- ./dmcreateuser cdcacc1 cdcacc1 cdcacc1 Password SYSADMIN TRUE FALSE TRUE
Setting up the InfoSphere CDC instance for shadow tables
- As cdcusr1 on Linux
- unset DISPLAY
- cd /opt/IBM/InfoSphereChangeDataCapture/ReplicationEngineforIBMDB2/bin
- ./dmconfigurets
- Enter to continue
- Enter instance name as cdc1
- Enter port number 60500
- Press enable to DISABLE auto-discovery port nunmber
- Enter staging store disk quota 1
- Press enter to accept maximum instance memory 1024MB
- Press enter to accept 64 bit
- Press enter to accept TCP only engine communication connection
- Select db2 instance 1 db2inst1
- Select database name 1 JUSTDAVE
- Press enter to not configure advanced parameters
- Enter username db2cdc1
- Enter password
- Press enter to list schemas
- Press enter again
- Enter 1 for JUSTDAVE1
- Specify a refresh loader path y
- Enter /home/db2inst1/refresh
- When instance is created say n to starting the instance now
- Enter 6 to exit the configuration tool
- ./dmset -I cdc1 maintain_replication_mqt_latency_table=true
- ./dmset -I cdc1 mirror_auto_restart_interval_minutes=2
- nohup ./dmts64 -I cdc1 &
- ./dmset -I cdc1
Output to last command is
staging_store_disk_quota_gb=1
mirror_auto_restart_interval_minutes=2
maintain_replication_mqt_latency_table=true
Check nohup.out file
IBM InfoSphere Change Data Capture is running.
Setting up the datastore for shadow tables with commands for IBM InfoSphere CDC Access Server
- As cdcusr1 on Linux
- cd /opt/IBM/InfoSphereChangeDataCapture/AccessServer/bin
- ./dmcreatedatastore accdat1 DataStore1 centos2.localdomain 60500
- ./dmaddconnection cdcacc1 accdat1 justdave db2cdc1 Derff1234 FALSE TRUE FALSE TRUE
Creating the SYSTOOLS.REPL_MQT_LATENCY table
As db2cdc1 on Linux
. /home/db2inst1/sqllib/db2profile
db2 connect to justdave
db2 "CALL SYSPROC.SYSINSTALLOBJECTS(’REPL_MQT’, ’C’,CAST (NULL AS VARCHAR(128)), CAST (NULL AS VARCHAR(128)))"
db2 LIST TABLES FOR SCHEMA SYSTOOLS
Expected output
Table/View Schema Type Creation time
------------------------------- --------------- ----- --------------------------
HMON_ATM_INFO SYSTOOLS T 2014-11-11-14.08.20.253520
HMON_COLLECTION SYSTOOLS T 2014-11-11-14.08.20.285709
POLICY SYSTOOLS T 2014-11-11-14.08.19.955391
REPL_MQT_LATENCY SYSTOOLS T 2014-11-12-06.30.12.091701
4 record(s) selected.
Create a shadow table with a required primary key
db2 "create table justdave1.colt(i1 int not null,i2 int) organize by row"
db2 "alter table justdave1.colt add constraint t_pk primary key (i1)"
db2 "create table justdave1.colt_s as (select * from justdave1.colt) data initially deferred refresh deferred enable query optimization maintained by replication organize by column"
db2 "set integrity for justdave1.colt_s all immediate unchecked"
db2 "alter table justdave1.colt_s add constraint colt_s_ix primary key (i1)"
db2 "select substr(tabname,1,24) as tabname,substr(tabschema,1,24) as tabschema from syscat.tables where substr(property,23,1) = 'Y'"
Expected output
TABNAME TABSCHEMA
------------------------ ------------------------
COLT_S JUSTDAVE1
1 record(s) selected.
Setting up replication for shadow tables with CHCCLP
- su - cdcusr1
- /opt/IBM/InfoSphereChangeDataCapture/AccessServer/bin/chcclp
- connect server hostname centos2.localdomain port 60600 username cdcacc1 password Derff1234;
- connect datastore name accdat1;
- add subscription name shadow1 persistency yes;
- add table mapping sourceschema JUSTDAVE1 sourcetable COLT targetschema JUSTDAVE1 targettable COLT_S targetIndexMode index targetIndexName JUSTDAVE1.COLT_S_IX type standard method mirror;
Replicating data to shadow tables with CHCCLP
- /opt/IBM/InfoSphereChangeDataCapture/AccessServer/bin/chcclp
- connect server hostname centos2.localdomain port 60600 username cdcacc1 password Derff1234;
- connect datastore name accdat1;
- select subscription name SHADOW1;
- start mirroring method continuous;
- monitor replication filter subscription name SHADOW1;
Expected output
Monitors the replication state and latency of subscriptions.
Statistics requested at: Nov 12, 2014 7:55:37 AM
SUBSCRIPTION STATE SCHEDULED END LATENCY THRESHOLD SOURCE DATASTORE TARGET DATASTORE
---------------- ------------------- ---------------- ------------------- ------------------ ------------------
SHADOW1 Mirror Continuous accdat1 accdat1
Test replication
- db2 "insert into justdave1.colt values(1,1)"
- db2 "select * from justdave1.colt"
- db2 "select * from justdave1.colt_s"
This requires dbm cfg INTRA_PARALLEL set to YES otherwise
SQL1668N The operation failed because the operation is not supported with
this environment. Reason code: "5".
5
An attempt was made to use column-organized tables in an
environment in which intrapartition parallelism is disabled.
Also SORTHEAP and SHEAPTHRES_SHR need to be increased otherwise
SQL0955C Sort memory cannot be allocated to process the statement. Reason
code = "3". SQLSTATE=57011
3
Insufficient shared memory for queries on column-organized
tables.
Create 2 tables and merge
- db2
- create table a (a1 int,d1 char(20)) organize by column
- create table b (a2 int,d2 char(20)) organize by column
- insert into a values(1,'Item X')
- insert into b values(1,'Item Y')
- insert into b values(2,'Item Z')
- vim /tmp/a and add
-
merge into a target
using (select a2,d2 from b) source
on (target.a1 = source.a2)
when matched then update set d1=source.d2
when not matched then insert (a1,d1) values(a2,d2)
- db2 -tvf /tmp/a
merge into a target using (select a2,d2 from b) source on (target.a1 = source.a2) when matched then update set d1=source.d2 when not matched then insert (a1,d1) values(a2,d2)
DB20000I The SQL command completed successfully.
- db2 "select * from a"
A1 D1
----------- --------------------
1 Item Y
2 Item Z
2 record(s) selected.
Add a column!
db2 "alter table a add e char(10)"
DB20000I The SQL command completed successfully.
db2 "select * from a"
A1 D1 E
----------- -------------------- ----------
1 Item Y -
2 Item Z -
2 record(s) selected.
1.5. Synopsis tables can now include CHAR and VARCHAR columns
1.6. Adaptive Page-level compression for insert/import/ingest operations is now enabled by default
1.7. Index access for SELECT statements that are executed with the cursor stability (CS) isolation level is now supported
1.8. You can now create column-organized user-maintained materialized query tables (MQTs)
1.9. Failed conversion from row to column organized can now be cancelled.
Use db2convert -cancel
1.10. On AIX® operating systems, the automatic NUMA awareness that is provided by setting the DB2_RESOURCE_POLICY registry variable to AUTOMATIC is enhanced.
1.11. DECFLOAT is now supported as a column type on column-organized tables.
alter table a add df0 decfloat
DB20000I The SQL command completed successfully.
alter table a add df1 decfloat(16)
DB20000I The SQL command completed successfully.
alter table a add df2 decfloat(34)
DB20000I The SQL command completed successfully.
1.12. SQL Compatibility features provided by the DB2_COMPATIBILITY_VECTOR registry variable are now available for column-organized tables.
db2set DB2_COMPATIBILITY_VECTOR=10
db2stop force
db2start
db2 terminate
db2 create database dave2
db2 connect to dave2
db2 "create table a (b number(5)) organize by column"
DB20000I The SQL command completed successfully.
db2 "alter table a add c number"
DB20000I The SQL command completed successfully.
db2 "alter table a add d number(8,2)"
DB20000I The SQL command completed successfully.
The number datatype is mapped as per the manual
db2look -d dave2 -z DB2INST2 -tw a -e
CREATE TABLE "DB2INST2"."A" (
"B" DECIMAL(5,0) ,
"C" DECFLOAT(16) ,
"D" DECIMAL(8,2) )
IN "USERSPACE1"
ORGANIZE BY COLUMN;
2. HADR enhancements
2.1. HADR databases now support column-organized tables.
Check HADR setup
db2pd -db dave -hadr | egrep "Member|HADR_SYNCMODE|HADR_STATE|PRIMARY_INSTANCE|STANDBY_INSTANCE"
Database Member 0 -- Database DAVE -- Active -- Up 0 days 00:07:02 -- Date 2014-09-07-12.32.01.038136
HADR_SYNCMODE = SYNC
HADR_STATE = PEER
PRIMARY_INSTANCE = db2inst2
STANDBY_INSTANCE = db2inst3
Check tables on secondary
db2 connect to dave
db2 "select substr(tabname,1,10) tabname from syscat.tables where tabschema='DB2INST2'"
TABNAME
----------
A
B
2 record(s) selected.
On primary create column organized table c
db2 "create table c (a1 int) ORGANIZE BY COLUMN"
DB20000I The SQL command completed successfully.
db2 "insert into c values(1)"
DB20000I The SQL command completed successfully.
db2 "grant select on c to db2inst3"
DB20000I The SQL command completed successfully.
db2 "select * from c"
A1
-----------
1
1 record(s) selected.
On secondary instance check tables
db2 "select substr(tabname,1,10) tabname from syscat.tables where tabschema='DB2INST2'"
SQL1224N The database manager is not able to accept new requests, has
terminated all requests in progress, or has terminated the specified request
because of an error or a forced interrupt. SQLSTATE=55032
db2 connect to dave
Database Connection Information
Database server = DB2/LINUXX8664 10.5.4
SQL authorization ID = DB2INST3
Local database alias = DAVE
[db2inst3@centos4 db2dump]$ db2 "select substr(tabname,1,10) tabname from syscat.tables where tabschema='DB2INST2'"
TABNAME
----------
A
B
C
3 record(s) selected.
db2 "select * from c"
A1
-----------
SQL1773N The statement or command failed because it requires functionality
that is not supported on a read-enabled HADR standby database. Reason code =
"7".
Reason 7 is
7
An attempt was made to query a column-organized table on an
HADR standby database prior to DB2 Version 10.5 fix pack 4.
This is 10.5 FP4
db2level
DB21085I This instance or install (instance name, where applicable:
"db2inst3") uses "64" bits and DB2 code release "SQL10054" with level
identifier "0605010E".
Informational tokens are "DB2 v10.5.0.4", "s140813", "IP23623", and Fix Pack
"4".
Product is installed at "/opt/ibm/db2/V10.5.0.4".
db2 get dbm cfg | grep CUR_EFF
Current effective arch level (CUR_EFF_ARCH_LVL) = V:10 R:5 M:0 F:4 I:0 SB:0
Current effective code level (CUR_EFF_CODE_LVL) = V:10 R:5 M:0 F:4 I:0 SB:0
Read-On-Standby is not currently supported for HADR with BLU Acceleration
2.2. If you are using Internet Protocol version 6 (IPV6) adapters, you can now configure HADR with the db2haicu command.
2.3. Three new monitoring fields are added to the db2pd command and the MON_GET_HADR table function.
db2pd new fields
db2pd -db dave -hadr | egrep "HEARTBEAT_MISSED|HEARTBEAT_EXPECTED|STANDBY_ERROR_TIME"
HEARTBEAT_MISSED = 0
HEARTBEAT_EXPECTED = 2
STANDBY_ERROR_TIME = NULL
MON_GET_HADR table function new fields
db2 "select HADR_ROLE,HADR_SYNCMODE,HADR_STATE,HEARTBEAT_MISSED,HEARTBEAT_EXPECTED,STANDBY_ERROR_TIME from TABLE(MON_GET_HADR(-1))"
HADR_ROLE HADR_SYNCMODE HADR_STATE HEARTBEAT_MISSED HEARTBEAT_EXPECTED STANDBY_ERROR_TIME
------------- ------------- ----------------------- ---------------- ------------------ --------------------------
PRIMARY SYNC PEER 0 16 -
1 record(s) selected.
3. pureScale enhancements
3.1. DB2 pureScale Feature on a Transmission Control Protocol/Internet Protocol over Ethernet (TCP/IP) network without special remote direct memory access (RDMA) capable adapters.
First install FreeNas on a VM - FreeNAS
Thanks go to Installing FreeNAS on VMware Workstation
- VMWare Workstation 10 recognises this as FreeBSD 64-bit!
- Give it 1 cpu,1GB RAM accept the other defaults
- Reboot when prompted and whilst it boots disable the cd drive (CD door is locked until reboot!)
- When it boots it will eventually prompt you with the http URL for Web Administration
- Go the Web URL, set the root password and the admin screen appears!
- Go to network tab and network setting, interface, add interface
- NIC - Default em0
- Interface Name Primary
- DHCP - Leave blank
- IPv4 address - 192.168.139.210
- IPv4 Netmask - /24 255.255.255.0
- Leave other fields blank
- Save and accept network connectivity will be interrupted
- When loading... prompt appears change IP address in the browser URL to 192.168.139.210
- Edit the VM Settings and add Hard Disk with all the defaults (20GB)
- Use the admin screen down the left side pick reboot
- Once back, use the admin screen, select services
- Click on the tool symbol next to iscsi to configure iSCSI
- Scroll down and enable LUC
- Set Controller IP Address to 192.168.139.210
- Leave Controller IP Port as 3261
- Set Controller Authorized Network to 192.168.139.0/24
- Set Controller Auth Method/Controller Auth Group to None!
- Save settings
- Under iSCSI change to Portals and Add a Portal
- Pick IP address from dropdown and Leave Port as 3260
- Under iSCSI change to Initiators and Add a Initiator
- Accept Initiator defaults and save
- Under iSCSI change to Extents and Add a Extent
- Extent Name - Volume1
- Extent Type - Device
- Extent Device - da1 (20GB)
- Enable TPC - Leave enabled
- Under iSCSI change to Target and Add a Target
- Change Target Name to data1 and accept defaults from the dropdowns
- Portal Group ID - 1 (FreeNAS)
- Initiator Group ID - 1
- Under iSCSI change to Associated Targets and Add Target/Extent, accept defaults
- Go to services tab and start iSCSI
On the Linux VM enable iSCSI Initiator
Thanks go to Configure iSCSI Initiator.
- yum update
- yum whatprovides "*/iscsiadm"
- yum install iscsi-initiator-utils-6.2.0.873-13.el6.x86_64 -y
- Check no CHAP passwords are enabled in iscsi setup
- grep -v "^#" /etc/iscsi/iscsid.conf | grep -v "^$"
- who -r # Current runlevel should be 5
- Check iscsi is enable at runlevel 5 - chkconfig --list iscsi
- iscsiadm -m discovery -t sendtargets -p 192.168.139.210
Starting iscsid: [ OK ]
192.168.139.210:3260,1 iqn.2011-03.org.example.istgt:data1
- iscsiadm -m node -o show
Should see data1
- iscsiadm -m node --login
Logging in to [iface: default, target: iqn.2011-03.org.example.istgt:data1, portal: 192.168.139.210,3260] (multiple)
Login to [iface: default, target: iqn.2011-03.org.example.istgt:data1, portal: 192.168.139.210,3260] successful.
- vim /var/log/messages # Added as /dev/sdb
Nov 13 19:28:00 centos2 kernel: scsi3 : iSCSI Initiator over TCP/IP
Nov 13 19:28:01 centos2 kernel: scsi 3:0:0:0: Direct-Access FreeBSD iSCSI Disk 0123 PQ: 0 ANSI: 5
Nov 13 19:28:01 centos2 kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0
Nov 13 19:28:01 centos2 kernel: sd 3:0:0:0: [sdb] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
Nov 13 19:28:01 centos2 kernel: sd 3:0:0:0: [sdb] Write Protect is off
Nov 13 19:28:01 centos2 kernel: sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Nov 13 19:28:01 centos2 kernel: sdb: unknown partition table
Nov 13 19:28:01 centos2 kernel: sd 3:0:0:0: [sdb] Attached SCSI disk
Nov 13 19:28:02 centos2 iscsid: Connection1:0 to [target: iqn.2011-03.org.example.istgt:data1, portal: 192.168.139.210,3260] through [iface: default] is operational now
3.2. A geographically dispersed DB2 pureScale cluster (GDPC) environment is extended to support a remote direct memory access (RDMA) over Converged Ethernet (RoCE) network.
3.3. On supported Linux operating systems, a DB2 pureScale environment can now be run on a set of virtual machines.
3.4. Purescale backup and recovery operations are extended to include incremental backups.
3.5. In a DB2 pureScale environment, the DB2 Spatial Extender is now supported.
3.6. When applying a fix pack in a DB2 pureScale environment, if GPFS™, Tivoli SA MP, or RSCT were already manually installed or updated manually, you can force the installFixPack command to overwrite the already installed version.
3.7. Inplace (online) table reorganization is now supported in a DB2 pureScale environment..
3.8. Federated two-phase commit is now supported in a DB2 pureScale environment.
3.9. Purescale - a new db2iupgrade parameter, -g, upgrades all the members and cluster caching facilities (CFs) at the same time, in parallel.
4. SQL compatibility enhancement and multicultural support enhancement
4.1. Handling of multibyte characters in character and graphic string data types is improved by allowing data type lengths to be specified as a number of string units.
Note that CODEUNITS32 is not supported for column organized tables
db2 "alter table a add w1 char(10 octets)"
DB20000I The SQL command completed successfully.
db2 "alter table a add w2 char(10 CODEUNITS32)"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1666N The table definition statement failed because some functionality was
specified in the table definition that is not supported with the table type.
Unsupported functionality: "CHAR CODEUNITS32". SQLSTATE=42613
db2 "?" SQL1666N
This message is returned when an attempt is made to create or alter a
column-organized table with functionality that is not supported with
column-organized tables.
db2 "create table c (w2 char(10 CODEUNITS32)) organize by row"
DB20000I The SQL command completed successfully.
db2 "alter table c add w3 vargraphic(10 CODEUNITS16)"
DB20000I The SQL command completed successfully.
4.2. For successfully matching SQL statements, three new inexact statement matching rules are now supported.
5. Monitoring enhancements
5.1. New monitor elements monitor the use of sort heap memory to help you with its sizing and allocation.
5.2. New monitor elements assist with aggregation of package cache monitor data and detection of plan changes.
stmtid - The hash key value that identifies normalized statement text that is associated with a section. Semantic content such as the function path and current schema are not part of the statement identifier.
planid - The planid monitor element tracks important performance sensitive aspects of the access plan. Such aspects include the list and layout of access plan operators, identifiers of the objects that are being accessed, the number of each type of predicate for each operator, and performance sensitive operator arguments.
semantic_env_id - This hash value is computed over the default schema and function path elements in the compilation environment.
A value of 1 means the default schema and function path were not used during the compilation of the statement. The function path is treated as not being used if only functions in the SYSIBM schema are accessed and SYSIBM is the first entry in the function path.
db2 "select distinct semantic_env_id,count(*) from TABLE(MON_GET_PKG_CACHE_STMT(NULL, NULL, NULL, -2)) group by semantic_env_id"
SEMANTIC_ENV_ID 2
-------------------- -----------
1 53
1973084603141892647 11
3748832650439057064 1
3 record(s) selected.
db2 "select SECTION_TYPE,PACKAGE_SCHEMA,PACKAGE_NAME from TABLE(MON_GET_PKG_CACHE_STMT(NULL, NULL, NULL, -2)) where semantic_env_id=3748832650439057064"
SECTION_TYPE PACKAGE_SCHEMA PACKAGE_NAME
------------ -------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
S NULLID DB2L2K1R
1 record(s) selected.
5.3. New monitor elements identify statements in the package cache that had a suboptimal compilation.
db2 "select distinct PREP_WARNING,PREP_WARNING_REASON from TABLE(MON_GET_PKG_CACHE_STMT(NULL, NULL, NULL, -2))"
PREP_WARNING PREP_WARNING_REASON
------------ -------------------
0 0
1 record(s) selected.
5.4. The new built-in routine MON_GET_SECTION helps to retrieve and store a copy of the executable section for further investigation.
The MON_GET_SECTION table function returns a copy of a section for a dynamic or static SQL statement from the package cache. The section that is returned can be saved for future analysis. For example, when you investigate a plan change for a statement, the saved section can be passed as input to the EXPLAIN_FROM_DATA stored procedure to examine the previous access plan.
5.5. The new built-in routine MON_GET_SECTION_OBJECT helps to identify sections that access an object or set of objects, and helps explore which objects a section depends on.
As part of your investigation of a poorly performing statement, you want to examine which objects are used in the access plan for the statement.
db2 "select EXECUTABLE_ID from TABLE(MON_GET_PKG_CACHE_STMT(NULL, NULL, NULL, -2)) where semantic_env_id=3748832650439057064"
EXECUTABLE_ID
-------------------------------------------------------------------
x'0100000000000000AD0100000000000007000000010020140830161428497724'
1 record(s) selected.
db2 "SELECT DISTINCT OBJECT_TYPE, substr(OBJECT_SCHEMA,1,20) OBJECT_SCHEMA, substr(OBJECT_MODULE,1,20) OBJECT_MODULE, substr(OBJECT_NAME,1,20) OBJECT_NAME FROM TABLE (MON_GET_SECTION_OBJECT(x'0100000000000000AD0100000000000007000000010020140830161428497724',NULL, NULL, NULL, NULL, -2))"
OBJECT_TYPE OBJECT_SCHEMA OBJECT_MODULE OBJECT_NAME
---------------- -------------------- -------------------- --------------------
TA SYSIBM - SYSTABLES
1 record(s) selected.
6. Application interface enhancements
6.1. The CLI driver that is included with this fix pack contains several enhancements.
6.2. The IBM Data Server Provider for .NET that is included with this fix pack contains several enhancements.
6.3. Use of array variables in INSERT, UPDATE, and DELETE statements are supported by embedded SQL applications.
6.4. You can skip local code page conversion for the graphic data types in embedded SQL application with the SkipLocalCPConversionForWcharConvert IBM data server driver configuration keyword.
6.5. JSON (Java™ Script Object Notation) DB2 NoSQL capabilities are enhanced with new security features, new flexible data types for the _ID field, capped collections, new aggregate functions, and better control through various administration changes.
7. Other miscellaneous enhancements
7.1. On supported Linux and AIX operating systems, a non-root installation of DB2 database server product supports thin server instance environment.
7.2. The db2look command supports two new parameters -createdb and -printdbcfg.
db2look -d dave -createdb
CREATE DATABASE DAVE
AUTOMATIC STORAGE YES
ON '/home/db2inst2'
DBPATH ON '/home/db2inst2/'
USING CODESET UTF-8 TERRITORY US
COLLATE USING IDENTITY
PAGESIZE 4096
DFT_EXTENT_SZ 32
CATALOG TABLESPACE MANAGED BY AUTOMATIC STORAGE
EXTENTSIZE 4
NO FILE SYSTEM CACHING
AUTORESIZE YES
INITIALSIZE 32 M
MAXSIZE NONE
TEMPORARY TABLESPACE MANAGED BY AUTOMATIC STORAGE
EXTENTSIZE 32
FILE SYSTEM CACHING
USER TABLESPACE MANAGED BY AUTOMATIC STORAGE
EXTENTSIZE 32
NO FILE SYSTEM CACHING
AUTORESIZE YES
INITIALSIZE 32 M
MAXSIZE NONE
;
db2look -d dave -printdbcfg
-- The db2look command generates the UPDATE DB CFG statements
-- to replicate the database configuration parameters based on
-- the current values in the source database.
-- For the configuration parameters which support AUTOMATIC,
-- you need to add AUTOMATIC to the end
-- if you want the DB2 database to automatically adjust them.
--UPDATE DB CFG FOR DAVE USING ALT_COLLATE ;
UPDATE DB CFG FOR DAVE USING STMT_CONC OFF ;
UPDATE DB CFG FOR DAVE USING DISCOVER_DB ENABLE ;
UPDATE DB CFG FOR DAVE USING DFT_QUERYOPT 5 ;
UPDATE DB CFG FOR DAVE USING DFT_DEGREE 1 ;
UPDATE DB CFG FOR DAVE USING DFT_SQLMATHWARN NO ;
UPDATE DB CFG FOR DAVE USING DFT_REFRESH_AGE 0 ;
UPDATE DB CFG FOR DAVE USING DFT_MTTB_TYPES SYSTEM ;
...
--UPDATE DB CFG FOR DAVE USING SMTP_SERVER ;
--UPDATE DB CFG FOR DAVE USING SQL_CCFLAGS ;
UPDATE DB CFG FOR DAVE USING SECTION_ACTUALS NONE ;
--UPDATE DB CFG FOR DAVE USING CONNECT_PROC ;
UPDATE DB CFG FOR DAVE USING SYSTIME_PERIOD_ADJ NO ;
UPDATE DB CFG FOR DAVE USING LOG_DDL_STMTS NO ;
UPDATE DB CFG FOR DAVE USING LOG_APPL_INFO NO ;
UPDATE DB CFG FOR DAVE USING DFT_SCHEMAS_DCC NO ;
7.3. You can now obtain the details of all statement handles that were allocated by the CLI driver prior to enabling a DB2 trace.
7.4. You can now format the DB2 trace that is taken with the -cli option to a directory, where separate trace files are created for each thread id in a process.
7.5. The db2cli command adds a -displaylic option to display license information.
Not valid for LUW!
db2cli validate -database dave:localhost.localdomain:50001 -connect -user db2inst2 -passwd XXX -displaylic
...
-DisplayLic or -UseServerLic option is not applicable for LUW/Informix server.
7.6. The db2cli command allows testing the connection to DB2 for z/OS or DB2 for i server with the server-side DB2 connect license when the -useserverlic option is specified.
7.7. The db2cli command allows testing the data source name (DSN) connection with the ODBC driver manager when the -odbcdsn option is specified..
7.8. The db2audit command has been enhanced with a new syslog parameter.
db2audit configure scope sysadmin status both
db2audit start
db2audit describe
db2 update dbm cfg using svcename db2c_db2inst2
db2audit flush
db2audit stop
db2audit archive to /tmp/z
db2audit extract syslog kern.info from files /tmp/z/db2audit.instance.log.0.20140830203913
As root
grep info /etc/rsyslog.conf | tail -1
*.info;mail.none;authpriv.none;cron.none /var/log/messages
grep -i update /var/log/messages
Aug 30 20:44:40 localhost db2audit: timestamp=2014-08-30-20.39.12.136294; category=SYSADMIN; audit event=UPDATE_DBM_CFG; event correlator=4; event status=1362; database=DAVE2; authid=DB2INST2; application id=*LOCAL.DB2.140830231136; application name=db2bp; instance name=db2inst2; hostname=localhost.localdomain;
7.9. Additional EXPLAIN arguments are now supported.
7.10. Enhanced encryption is now possible with the adherence to NIST SP 800-131A.
To comply with NIST SP 800-131A, DB2 V10.5 Fix Pack 4:
- upgrades GSKit to 8.0.14.32.
- upgrades IBM® Tivoli® Directory Server to 6.3.0.24.
- upgrades the JDK to 6 SR14.
- supports database manager configuration for TLS 1.2.
7.11. You can now ensure that all database backups are always encrypted.
Two new database configuration parameters
db2 get db cfg for dave | grep -i encr
Encryption Library for Backup (ENCRLIB) =
Encryption Options for Backup (ENCROPTS) =
7.12. The performance of SQL Procedural Language (SQL PL) and SQL/PL language execution has been enhanced.
7.13. Additional operating systems are supported.
7.14. Translation from DB2 Information Centre to IBM Knowledge Centre is complete.