Monday, February 14, 2011

Valentine's Day: How to date with DB2...

Today is Valentine's Day and according to Wikipedia an annual commemoration to "celebrating love and affection between intimate companions". This sounds like the typical DBA and database system relationship to me. What fits better on this day than looking into some of the data functionality DB2 has to offer.

Everybody should know who you are dating with. In case you don't know, here is an example to know more about your current date:

values(current date)

1                 
----------
14/02/2011


To find out what was going on yesterday, the following might come in handy:
values(current date - 1 day)

1                 
----------
13/02/2011


Many people wonder whether they and their date will match up. I always know when looking at the "date compatibility".

get db cfg
...
Date compatibility                                      = OFF
...

Well, this doesn't look too promising, but I know a way around. I can set the DB2_COMPATIBILITY_VECTOR and then look try again (requires instance restart and new database - this is life!).

get db cfg

...
Date compatibility                                      = ON
...


This looks much better and promising and I am sure that my (so far Oracle-based) application and DB2 are the perfect match. And because of the right financial details (licensing, maintenance, HR costs, ...) and properties like automatic maintenance (who would like that one in a household?), compression (are the cabinets and the attic crammed?), and performance they seem to move towards the "happily ever after" ending....

Tuesday, February 8, 2011

Power of attorney and trusted contexts

When you file a patent, you usually don't file a patent because someone else is doing the (paper)work for you. A similar thing can happen with other paperwork or places where you usually have to appear in person. In most cases you can delegate the work and sign a power of attorney (in German "Vollmacht"), i.e., something that grants the person mentioned in that paper the power to act or sign in behalf of you. The person acting can represent multiple other persons and he/she may switch roles during the process.

This reminded me of trusted contexts in DB2. When a trusted context is used that special user can act for others by switching the userid. As with legal matters, there are also some strings attached to trusted contexts and this overview page has gives you an introduction to what to expect.

BTW: This posted was written on behalf of Henrik.

Tuesday, February 1, 2011

Redbook published: Extremely pureXML in DB2 10 for z/OS

Now the IBM Redbook "Extremely pureXML in DB2 10 for z/OS" has made its way to the public. On more than 300 pages it covers all important topics for XML data processing in DB2 on the mainframe.