Db2 for z/OS and its ecosystem

Db2 for z/OS and its ecosystem

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only

Avoid outages for rebinds of SQL PL routines and trigger packages with Db2 13 function level 508

By Paul McWilliams posted yesterday

  

Downtime during application updates can disrupt critical workloads and frustrate users. With Db2 13 Function Level 508, DBAs and application developers can deploy more new features without outages—thanks to rebind phase-in for SQL PL routines and trigger packages.

Function level 508 extends the rebind phase-in capability already available for most application packages starting in Db2 12, making it available to packages for SQL PL routines and triggers. This capability is especially helpful in busy Db2 environments, where the packages are often continuously executed by one or many threads.

Before this enhancement, if the packages for native SQL routines and triggers require rebinds to deploy new features, the DBA must find a time when no thread is running the native SQL routines and triggers. In a busy Db2 system, applications that call SQL routines and triggers are continuously running. With the requirement for 24x7 application availability, it is often nearly impossible for the DBA to find a time when the routines or triggers are not running.

With rebind phase-in, a rebind operation generates a new copy, while existing threads continue to execute the current copy of the package, which becomes the phased-out copy. When the new copy is committed by the rebind, that copy becomes the current copy and is immediately available for the next execution by a new thread. Threads that existed prior to the rebind can also use the new current copy when they release the phased-out copy (based on the RELEASE(COMMIT) or RELEASE(DEALLOCATE)[DG1]  options). In Db2 13, rebind phase-in is available for packages for SQL PL routines and triggers at function level 508 or higher.

Rebind phase-in for SQL PL routine packages and trigger packages has the following external behaviors, which are the same as for rebind phase-in for other packages:

  • Db2 generates a maximum of 14 copies for a package. Only one of them is the current copy. The current copy with its copy ID is stored in the catalog table SYSPACKAGE.
  • Phased-out copies are stored in SYSPACKCOPY. Subsequent REBIND PACKAGE or REBIND TRIGGER PACKAGE commands delete an existing phased-out copy if it can be safely deleted. The copy ID for a deleted phased-out copy can be reused. An alternative way to remove phased-out copies is to use the FREE PACKAGE command with PLANMGMTSCOPE(PHASEOUT/INACTIVE).
  • Rebind phase-in requires PLANMGMT(EXTENDED). If APREUSE(WARN/ERROR) is specified, APREUSESOURCE(CURRENT) is also required.
  • REBIND SWITCH can be done while the package is being executed if the PLANMGMT subsystem parameter is set to EXTENDED. 

The rebind phase-in capability is not supported for ALTER statements that only change bind options of the SQL PL routine or trigger package. The REBIND PACKAGE command is the recommended approach for these situations.

By extending rebind phase-in to SQL PL routines and trigger packages, Db2 13 function level 508 enables DBAs to deploy new features confidently, without hunting for downtime windows, disrupting critical workloads, or sacrificing 24x7 availability. This capability helps you keep pace with business demands while maintaining the availability and stability that your applications require.

For more information, see the following topics in the Db2 product documentation:

·       Function level 508 – Phase in rebind for SQL PL and trigger packages

·       Phase-in of package rebinds

·       REBIND PACKAGE subcommand (DSN)

·       REBIND TRIGGER PACKAGE command (DSN)

#Db2forz/OS #Db2Z

0 comments
2 views

Permalink