Problem resolution with DB2 database products

db2 tutorial, db2 performance tuning, db2 tools, db2 commands, db2 administration




Training for DB2 that focuses on IBM exams not consultants getting $1000/day

I’d like to enhance my training by earning a IBM examination oriented
DB2 credential.

But when I search the internet, even IBM’s traing site, all I find are
entities that want to sell me on a $1000/day training seminar.

Is there a such thing as examination orentied DB2 training from IBM
where you can purchase a book, study on your own, and then take an exam
for ~$200 and earn a recognized DB2 credential?

And please, pass on the links to sites having more $1000/day traing
seminars. Those are a waste and an insult to REAL education like you’d
get in a US state university.

Thanks.

Comment (1)

interesting index design question.

On a 3 [INTEGER] column table, the PK consists of all 3 columns.
I [also] have queries on the first two columns, as well as on the last two
columns. (Select * where column3=x and column2=y.)
I was hoping that this same pk index will suffice for the latter
(reverse-scan is on), but its doing a table scan.
Have I misinterpreted what a reverse-scan is?

Please advise. Thanks.
nat

Comments (2)

Marketplace Announcment: "Yellowfin Reporting" Version 3 rollout

Marketplace Announcment: "Yellowfin Reporting" Version 3 rollout

Release 3 continues to emphasise Yellowfin’s commitment to delivering
the very best in web based operational BI.  This release is another
large step in defining web based reporting capability.

Some of the major features in this release include:

* User Interface and Drag and Drop Design Changes
* Calculated Fields & Advanced Analytic Functions
* Exception Based Reporting
* OLAP and Lotus Notes Connectivity
* Integration and Embedding Improvements

We continue to enhance the User Interface to deliver greater
functionality without additional complexity by focusing our efforts on
how business users interact with the web.  BI should not be rocket
science and our commitment to reducing complexity is the driver for our
interface design.  The use of drag and drop functionality is one such
example, this has been integrated into our dashboard builder and for
chart placement and resizing.

Naturally users are demanding more from their reporting environments
with version 3 you can now access the expression builder for creating
calculations on the fly as well as building customised Advanced
Analytic Functions that allow your users to manipulate data in a way
that is relevant for your business and independent of the database from
where your data is sourced.

A further refinement to our broadcast capability is the ability to
defined exception based reporting.  With the amount of information
delivered to managers growing at an alarming pace you can limit the
number of irrelevant reports they receive by only sending them if they
meet certain criteria.

Writing reports may be easy, buts it’s tough if you cannot access all
your organisational data.  With Yellowfin you can now report from OLAP
cubes as well as Lotus Notes / Domino data sources.  Why build a data
mart when you should be able to access all your data directly from the
source for operational reports. Once again we have considered the end
user to ensure that the process for building reports does not change
based on the source of your data.  After all your users should not have
to learn a new interface for every data source that they access.

To meet the integration needs of operational BI Yellowfin continues to
refine its security and embedding options.  In release 3 we have added
additional functionality to LDAP directory integration and made
significant improvements to our Web Services providing you with a full
SOA approach to integrating Yellowfin into your applications.

No Comments

recovery time is bigger than current time

Why the recovery to time is greater than the current time?
————————————————————————— ——————————————
Last committed transaction             = 2006-08-23-22.09.40.000000

DB20000I  The ROLLFORWARD command completed successfully.
db2 => connect to test

   Database Connection Information

 Database server        = DB2/6000 7.1.0
 SQL authorization ID   = DB2INST1
 Local database alias   = TEST

db2 => select count(*) from t1

1
———–
        280

  1 record(s) selected.

db2 => select current time from dual

1
——–
17:33:47

  1 record(s) selected.

Comments (2)

Getting SQLERRMC into DB2 for LUW Stored Procedure

I’m trying to get the SQLERRMC info from the SQLCA into my SP so that I
can use the information it provides.   I’m successfully getting the
SQLCODE and SQLSTATE and so added the SQLERRMC to the code which
obtains these.   It doesn’t seem to work however –

create procedure dbair001.sp001testerr
(
,OUT p_sqlstate CHAR(5)
,OUT p_sqlcode  INTEGER
,OUT p_sqlerrmc VARCHAR(70)
)
specific dbair001.sp001testerr
begin
        —
        — Declare return codes
        —
        DECLARE SQLSTATE CHAR(5) DEFAULT ’00000′;
        DECLARE SQLCODE  INTEGER DEFAULT 0;
        DECLARE SQLERRMC VARCHAR(70);
        —
        — Define working storage
        —
        declare v_dynstmt             VARCHAR(100);
        —
        — Define error handlers
        —
        DECLARE EXIT HANDLER FOR SQLEXCEPTION
                SELECT
                SQLSTATE,
                SQLCODE,
                SQLERRMC
                INTO
                p_sqlstate,
                p_sqlcode,
                p_sqlerrmc
                FROM
                sysibm.sysdummy1;
        —
        — Start of procedure logic
        —
        — Initialize output parameters with defaults
        —
        VALUES (SQLSTATE,SQLCODE, SQLERRMC) INTO p_sqlstate, p_sqlcode,
p_sqlerrmc;
        —
        — Set up SQL to unknown table
        —
        SET v_dynstmt = ‘INSERT INTO DBAIR001.T0010TEST (COL1) VALUES
(1)’;
        PREPARE v_prepstmt FROM v_dynstmt;
        EXECUTE v_prepstmt;
end#

This doesn’t work however –

bash-2.05b$ db2 "call dbair001.sp001testerr(?,?,?)"

  Value of output parameters
  ————————–
  Parameter Name  : P_SQLSTATE
  Parameter Value : 42704

  Parameter Name  : P_SQLCODE
  Parameter Value : -204

  Parameter Name  : P_SQLERRMC
  Parameter Value : –

  Return Status = 0

Any idea what I’m doing wrong ?

Thanks

Phil Nelson

Comments (2)

SYSPROC.ADMIN_CMD

I am trying to do the following from within a procedure.

set vcsql = ‘Call SYSPROC.ADMIN_CMD(‘ || ”’load from /dev/null of del
replace into bi.Provisioned_Spam”’ || ‘)’;

        execute immediate vcsql;

The documentation says that I can use the sysproc.admin_cmd for load,
but when i use the above statement, it throws me an error.

SQL0104N  An unexpected token "load" was found following
"BEGIN-OF-STATEMENT".
Expected tokens may include:  "DESCRIBE".  SQLSTATE=42601

Comments (3)

IBMDBDB2 OLEDB provider does not appear to like case

I have sucessfully created an  SQL SERVER LINKED SERVER to point to DB2
on Z/OS.
I have been successully able to copy most of the tables in the
database. However, I have a couple that have a dates outside of SQL
Server supported range.

IBMDADB2 at 8.1 FIXPAK 10.

I can run the OPENQUERY() component on the mainframe and it works fine
except when using CASE. I can CAST various datatypes fine (From
TIMESTAMP to CHAR(26) for instance)

TRUNCATE TABLE METER_PT
INSERT INTO  METER_PT
SELECT KY_PREM_NO, KY_SPT, KY_MPT_NO, KY_MTR_EQUIP_NO,
 CD_MTR_EQUIP_MFGR,DT_EFF, CD_MTR_STAT, CD_MPT_STAT, CD_STAT,
 CD_MPT_USE, QY_MTR_MULT, QY_NO_OF_DIAL
 FROM OPENQUERY(HOST,’
 SELECT KY_PREM_NO, KY_SPT, KY_MPT_NO, KY_MTR_EQUIP_NO,
 CD_MTR_EQUIP_MFGR,
 CASE WHEN DT_EFF < ’1800-01-01′ THEN NULL ELSE DT_EFF END DT_EFF,
 CD_MTR_STAT, CD_MPT_STAT, CD_STAT,
 CD_MPT_USE, QY_MTR_MULT, QY_NO_OF_DIAL
 FROM DB2X.XXXXX.METER_PT
 ’)
GO

Comment (1)

Toad for DB2

I just installed the New Toad utlity to access my DB2 database. Its a
very cool utility, it has a lot of other features.. I am not sure of
the other client utilities for DB2.

New Toad utility supports 8.1.6 client version. But I do have only
8.1.3 version yet I was able to install but none of my other collegues
were able to install as they had 8.1.3 version.

I would like to know If I had anything else in my system which had
allowed me to install Toad.

Could anyone also help me how to identify the run-time client version (
other than opening a db2 command window).

Thanks.

No Comments

Is Java 1.3.1 compatible with DB2 v8.1 ?

Thanks.

Comment (1)

db2 incremental backup

Excuse me for asking such a stupid question…
Our databse configured for incremental backup’s (trackmod on), we need
to drop a tablespace . Will this cause the incremental backup’s to
fail? (earlier we had a similar issue when we created a tablespace
after the full backup ).

No Comments