Thursday, April 3, 2014

(SOLVED) DB2 Quiz: What function do I call?

Today, it is time for another DB2 quiz. I am going to present you the output of a DB2 function:


---
YES

  1 record(s) selected.

Which built-in function did return this result? I invoked the function this way "values funcname", no parameters were involved. The function was added to DB2 in version 10.1.

Added on April 3rd:
As you can see from the comments, the quiz has been solved. I called the administrative function ADMIN_GET_INTRA_PARALLEL(). The function returns either YES or NO depending on whether the database application will run with intraparallel parallelism enabled or not. In DB2 10.1 several enhancements were made to exploiting parallelism. In addition to the database manager (dbm) switch INTRA_PARALLEL to enable or disable parallelism, it is also possible to call the new procedure ADMIN_SET_INTRA_PARALLEL() to configure parallelism for a specific connection.

7 comments:

Dick Rietveld said...

db2 "values upper('yes')"
works for me :)

Henrik Loeser said...

Yup, that works for you and many others. But it is NOT a built-in function added in DB2 10.1. Try it again... ;-)

Henrik

Stefan Mihokovic said...

I think you mean this function.

db2 VALUES TO_SINGLE_BYTE(x'796573')

1
---
yes

Stefan Mihokovic said...

or better

VALUES TO_SINGLE_BYTE(x'594553')

1
---
YES

Henrik Loeser said...

Nope. The function I used does not have parameters (as stated above :).

Henrik

andyande said...

Nice brain teaser Henrik!

VALUES ADMIN_GET_INTRA_PARALLEL()

Henrik Loeser said...

Yup, that is the function I called. Details can be found in the DB2 Information Center entry for ADMIN_GET_INTRA_PARALLEL().

Congratulations!

Henrik

LinkWithin

Related Posts with Thumbnails