Feedback
Did this article resolve your question/issue?

   

Article

What are the minimum DB2 permissions needed for a user to create packages?

Information

 
TitleWhat are the minimum DB2 permissions needed for a user to create packages?
URL Name3017
Article Number000147756
EnvironmentProduct: Connect for ODBC DB2 driver, Connect for JDBC DB2 driver, Connect for ADO.NET DB2 provider
Version: All supported versions
OS: All supported platforms
Databases: DB2
Application: All supported applications
Question/Problem Description
What are the minimim DB2 permissions needed for a user to create packages?
Is that the same across DB2 versions & UDB/390/400?
 
Steps to Reproduce
Clarifying Information
DataDirect Connect drivers automatically create and bind DB2 packages for use on the DB2 server. To do this, the initial connection requires certain database permissions.
Error MessageAUTHORIZATION ERROR BIND accountname
Bind process is not active. Please ensure that the user has permissions to create packages. Packages cannot be created in an XA Connection.
Defect Number
Enhancement Number
Cause
Resolution
The Connect Series for ODBC User's Guide lists these permissions as necessary to create the DB2 packages:
  • BINDADD for binding packages
  • CREATEIN on the collection specified by the Package Collection option
  • GRANT EXECUTE on the PUBLIC group for executing the packages
In more detail:
  • For DB2 on OS/390 or MVS, need one of the following authorities:

    SYSADM,
    SYSCTRL


    or BINDADD and CREATE IN COLLECTION your-collection. need the CREATE IN authority if one only have the BINDADD authority.
  • For DB2 for OS/400, need CHANGE authority or higher on the collection where one want to create the package.
  • For DB2 on Windows, UNIX, & Linux, need DBADM authority.  Connect using ODBC driver with a user ID with DBADM privileges to create packages.

To set authorities for a specific user, type the following at a DB2 command prompt:

GRANT DBADM, CREATETAB, BINDADD, CONNECT ON DATABASE TO USER (username)

Replace (username) with the name of the user ID that use to log on with when using the driver.

Workaround
Request that DBA make the initial connection. Once the initial connection is made with a user with the appropriate permissions, all database users will be able to connect to the database.
Notes
If a second connection is made that requires the packages to be rebound and an existing connection is currently using the packages, the second connection attempt will likely fail while attempting to drop the package that is in use (like attempting to drop a table that has a lock on it).  However, some of the packages may have been successfully dropped so the first connection may also encounter problems.  This situation should be avoided.
Last Modified Date6/18/2019 2:20 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.