Bookmark and Share
RSS

Recent Posts


Setting Special Registers Using Profiles

August 23, 2016

DB2 11 introduced a powerful feature that allows you to set special registers for remote applications by creating a profile in the profile tables. Information on the install jobs used to create these tables, as well as rules for inserting rows into the tables, can be found in the DB2 Administration Guide or the IBM Knowledge Center.

Two years ago, in a post about the new compatibility mode in DB2 11, I mentioned the APPLICATION COMPATIBILITY special register, which can control application behavior in dynamic SQL without having to change the application. But there are many special registers that allow you to do many things. The Knowledge Center has this list:
  • CURRENT APPLICATION COMPATIBILITY
  • CURRENT DEBUG MODE
  • CURRENT DECFLOAT ROUNDING MODE
  • CURRENT DEGREE
  • CURRENT EXPLAIN MODE
  • CURRENT GET_ACCEL_ARCHIVE
  • CURRENT FUNCTION PATH
  • CURRENT LOCALE LC_CTYPE
  • CURRENT MAINTAINED TABLE TYPES
  • CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION
  • CURRENT OPTIMIZATION HINT
  • CURRENT PACKAGE PATH
  • CURRENT PATH
  • CURRENT PRECISION
  • CURRENT QUERY ACCELERATION
  • CURRENT REFRESH AGE
  • CURRENT ROUTINE VERSION
  • CURRENT RULES
  • CURRENT SCHEMA
  • CURRENT SQLID
  • CURRENT TEMPORAL BUSINESS_TIME
  • CURRENT TEMPORAL SYSTEM_TIME
  • ENCRYPTION PASSWORD
  • PATH
  • SCHEMA
  • SESSION TIME ZONE
  • TIME ZONE

When the remote application has a match in the profile table (SYSIBM.DSN_PROFILE_TABLE), special register values are set prior to SQL statements being run in your application  These listed special registers can be set with the SPECIAL_REGISTER keyword in a profile attributes table. And be sure to click the above link, because it also includes a list of restrictions with the interface.

Special registers allow you to exert a lot of control over the remote application without having to change the application code. Remember: This control occurs at the package level and collection-id or authorization-id or other combinations based on the rules for SYSIBM.DSN_PROFILE_TABLE.

Are you taking advantage of profiles to control your remote applications?

Posted August 23, 2016| Permalink

comments powered by Disqus
-->