By Thomas Eng and Paul McWilliams.
In Db2 12 after you apply the PTF for
APAR PH21058, you can now remotely free a service that was previously copied to a remote production environment, without the logging in to the remote system.
We recently introduced a
BIND SERVICE COPY capability that you can use to create a service on a remote production system by copying it from your local development environment. However, to delete a service that you created that way, you had to either log in to the remote production system and issue the FREE SERVICE command in that system, or invoke the
dropService API through a REST client at the target server.
To support more efficient management, especially deleting, of services copied to remote production systems, APAR PH21058 introduces the capability to specify an optional
location-name value in the
FREE SERVICE (DSN) subcommand.
The
location-name value specifies the location of the DBMS where the service is to be freed.
For example, following example frees the REST service "payroll"."getEmployeeSalary" with a version-id of Ver2, on a remote server with the
location-name PRODSYS:
FREE SERVICE(PRODSYS."payroll"."getEmployeeSalary".(Ver2))
The location name must be defined in the
SYSIBM.LOCATIONS table. If this table does not exist or the remote DBMS is not found, you receive an error message. Also, if the location-name is specified, the name of the local Db2 subsystem must be defined. If you omit the
location-name, the local Db2 subsystem is the default.
Before you can use this new capability, both the local and remote server must be on at least Db2 12 with APAR PH21058 applied, and you must have authorization to issue the FREE SERVICE command.
Note that although the BIND SERVICE COPY capability is the currently the only way for Db2 for z/OS requestor to create a service on a Db2 for z/OS server, the new FREE service support introduced by this APAR supports freeing any native REST service remotely, regardless of whether it was created with the
createService API or the
DSN BIND SERVICE subcommand.
Thomas Eng is a Db2 for z/OS DDF Developer, and Paul McWilliams is an Information Developer for Db2 for z/OS.
Sign in and subscribe to always get the latest news about Db2 for z/OS from the IBM lab: http://ibm.biz/db2znews-subscribe
#Db2forz/OS#db2z/os#Db2Znews