db2rbind - Rebind all packages command
Rebinds packages in a database.
Authorization
- SYSADM
- SYSCTRL
- SYSMAINT
Required connection
None
Command syntax
Command parameters
- database
- Specifies an alias name for the database whose packages are to be revalidated.
- -l logfile
- Specifies the (optional) path and the (mandatory) file name to be used for recording the package revalidation process.
- all
- Specifies that rebinding of all valid and invalid packages is to be done. If this option is not specified, all packages in the database are examined, but only those packages that are marked as invalid are rebound, so that they are not rebound implicitly during application execution.
- -u userid
- User ID. This parameter must be specified if a password is specified.
- -p password
- Password. This parameter must be specified if a user ID is specified.
- -r
- Resolve. Specifies whether rebinding of the package is to be
performed with or without conservative binding semantics. This affects
whether new objects that use the SQL path for resolution are considered
during resolution on static DML statements in the package. This option
is not supported by DRDA.
Valid values are:
- conservative
- Only those objects in the SQL path that were defined before the last explicit bind time stamp are considered for resolving references to any objects that use the SQL path for object resolution. Conservative binding semantics are used. This is the default. This option is not supported for an inoperative package.
- any
- All possible matches in the SQL path are considered for resolving references to any objects that use the SQL path for object resolution. Conservative binding semantics are not used.
Usage notes
- This command uses the rebind API (sqlarbnd) to attempt the re-validation of all packages in a database.
- Use of db2rbind is not mandatory.
- For packages that are invalid, you can choose to allow package revalidation to occur implicitly when the package is first used. You can choose to selectively revalidate packages with either the REBIND or the BIND command.
- If the rebind of any of the packages encounters a deadlock or a lock timeout, all the successful rebinds until that moment will be rolled back. The rebind processing will resume after the rollback, starting from the package next to the one that caused the rollback.
- If you issue the db2rbind command and the instance is active, you will see the SQL1026N error message.
- Every compiled SQL object has a dependent package. The package can be rebound at any time by using the REBIND_ROUTINE_PACKAGE procedure. Explicitly rebinding the dependent package does not revalidate an invalid object. Revalidate an invalid object with automatic revalidation or explicitly by using the ADMIN_REVALIDATE_DB_OBJECTS procedure. Object revalidation automatically rebinds the dependent package.