Peeter Joot's (OLD) Blog.

Math, physics, perl, and programming obscurity.

dynamic DB2 database manager configuration parameters: must be connected!

Posted by peeterjoot on June 26, 2013

I was testing some updates to the code that gets executed when we process an update db cfg. Specifically, something of the following form

db2 update db cfg for b using CF_SCA_SZ 4096
db2 get db cfg for b | grep CF_SCA_SZ

I wanted to override the automatic default to set it to something very small to force a testing condition for my code. With an earlier version of my changes for this cfg update, I was able to do these sorts of updates dynamically, but then I started hitting errors like

DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W  One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective. 

I figured that I’d messed things up with my changes, preventing the dynamic config updates, but couldn’t figure out what. I proceeded to take db2trc’s, seeing how far through the internal function sqlfUpdateDbCfg() [which shows up in the db2diag.log], before there was a failure, and finally bugged the owner of the configuration code.

Turns out the resolution of this problem shouldn’t have been pouring through the source code, taking internal traces, and bugging developers that knew about the code. Instead I needed to RTFM (although the cfg owner nicely didn’t say that). Here’s what the help says for this error:

db2 \? SQL1363W


SQL1363W  One or more of the parameters submitted for immediate
      modification were not changed dynamically. For these configuration
      parameters, the database must be shutdown and reactivated before
      the configuration parameter changes become effective.

Explanation:

The database configuration command has been successfully processed.
However, not all changes were processed right away.

Changes to database configuration parameters can only take effect
dynamically if you are connected to the database. Not all configuration
parameters support dynamic update, meaning that they will not take
effect until the database is deactivated and reactivated.
...

I’d activated my database, but hadn’t connected. Earlier when I didn’t have this trouble I must have been connected. Simple explanation, leaving me feeling very dumb.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: