Part of the IBM Analytics family, focused on Analytic Platform product support. This blog is administered by Andrew McCarl (amccarl) and Kate Nichols (KateDawson), and follows the IBM Social Computing Guidelines.
When trying to convert your database to BLU. You may see that some tables fail. This can be seen like this.
In the progress of the convert utility. The below will be seen.
Table RowsNum RowsComm Status Progress (%)
--------------------------------------- --------------- --------------- --------------- ---------------
"TANJINXU"."ACT" 18 0 COPY Failed
This is caused by the utility heap size. The convert utility utilizes the admin move table function. If the utility heap size is not... [More]
I was working on a DB2 installation issue using db2setup wizard with 9.7 GA (FP0) on AIX 7.1, JDK 5 , the installation was failing with Segmentation fault error, the installer has generated java cores, similar to the one shown here below:
Type= Segmentation error vmState=0x00000000
In general, basic things to look at when these kind of errors happen are:
Recently I had opportunity to play around db2audit tool. db2audit tool is DBA's best friend when it comes find all the activities going on in database. DB2® database systems provide an audit facility to assist in the detection of unknown or unanticipated access to data. The DB2 audit facility generates and permits the maintenance of an audit trail for a series of predefined database events.
For more information about db2audit command, refer Information Center
db2audit can be divided in 5 main steps as :
One of our clients has a JCC application going through a DB2 Connect gateway connecting to DB2/Z database, instead of direct connection to DB2/Z. They wanted to know how to setup the automatic client re-route(ACR) if the DB2 Connect goes down.
Here are the steps:
In the case of the DB2 Connect server, because there is no requirement for the synchronization of local databases, you only need to ensure that both the original and alternate DB2 Connect servers have the target IBM mainframe database cataloged in... [More]
The current JDBC driver shipped with DB2 called the IBM CLIENT DRIVER FOR JDBC AND SQLJ can function as both a JDBC Type 4 and JDBC type 2 driver.
Type 4 Mode
When functioning as a JDBC type 4 driver, the driver is independent of the DB2 Client and only the driver jar db2jcc.jar or db2jcc4.jar need be installed. In this mode all TCP/IP command execution and routing is done through Java. In type 4 mode the driver requires the TCP/IP name and port of the server and uses the name of the database alias at the server. ... [More]
Hostname of operating system needs to be changed ?
I believe it's not frequent work. But those cases sometimes happen. For example, some naming policies changes or post work after solution package software delivery.
Changing hostname is not the difficult work itself in operating system administrator's perspective.
But if multiple softwares starts to up and running on the system, it needs to be handled very, very carefully especially with high availability cluster... [More]
From DB2 V9.7 Batched INSERT statements can return automatically generated keys.
If batch execution of a PreparedStatement object returns automatically generated keys, you can call the DB2PreparedStatement.getDBGeneratedKeys
method to retrieve an array of ResultSet objects that contains the automatically generated keys.
Recently I had a customer trying to use getDBGeneratedKeys method with Batch inserts in a JDBC application using JCC driver and was looking for an example.
Here is an example of how to use the... [More]
To collect explain output for a stored procedure (the stored procedure will be executed) :
db2set DB2_SQLROUTINE_PREPOPTS="EXPLAIN ALL"
Run the stored procedure
db2exfmt -d db_name -g TIC -w -1 -n % -s % -# 0 -o exfmt_bad.txt
To collect explain output for a stored procedure without executing it, you need to set db2set DB2_SQLROUTINE_PREPOPTS and db2 set current explain mode.
db2set DB2_SQLROUTINE_PREPOPTS="EXPLAIN ALL"
When restoring you must use the restore-options in the order shown in the InfoCenter If you don't you will see error SQL0104N
db2 "restore database sample from /tmp/backups to newdb without prompting without rolling forward"
SQL0104N An unexpected token "without" was found following "PROMPTING".
Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601
Per InfoCenter without rolling forward is listed before... [More]
If you have a .NET application utilizing DB2 drivers on Windows 64-bit that is crashing in the following stack (in MS dumps), what would you do to fix the problem?
44 Id: 1350.b98 Suspend: 1 Teb: 000007ff`ffeb0000 Unfrozen
Child-SP RetAddr : Args to Child
: Call Site
00000000`0a31acc8 000007fe`fd3a10dc : 00000000`00000000
00000000`07eb3eab 00000000`00000000 00000000`00000000 :
00000000`0a31acd0 00000000`07d457bd : 00000000`00000000... [More]
If you need regular database backup during night or weekends, use DB2 automatic maintenance feature.
Here is DB2 V9.7 Information Center URL:
1) How automatic maintenance job run?
The automatic maintenance feature has two phases. 1) Evaluation and 2) Execution.
1) Evaluation: Check whether we do task. Evaluation activity starts in every 2 hours since database is activated.... [More]
The db2ReadLog API is used to read log records from the DB2® database logs, or queries the Log Manager for current log state information.
Before a Embedded SQLC program can be used it has to be precompiled, bound, compiled and linked. Here is an example on how to use the db2ReadLog API using the dblogconn.sqc sample SQLC program that is provide with the DB2 sample scripts. This program reads the database log files asynchronously with a database connection using the db2ReadLog API.
Copy the sample c scripts from... [More]
Using a simple test case. This can be easily observed. Document was exported using a utility that applies a byte order mark to text documents.
db2 "create table numbers (col1 char(10),col2 char(10),col3 char(10))"
DB20000I The SQL command completed successfully.
[db2v97@ts-carose2 ~]$ db2 import from numbers.csv of del insert into numbers
SQL3109N The utility is beginning to load data from file "numbers.csv".
SQL3110N The utility has... [More]