Never Heard Before Data Access Errors in DB2 Database
In Db2 Database, data access is the authority that allows to data within a specific database. The database authority can be easily granted by the security administrator. This can be generated by a group, a user or even a role. There are some common people that can get the data access authority either indirectly or directly. However, there are some most common data access errors in db2 database. You can have a look at them one by one:
Data Access Error 1: SQL0567N "DB2ADMIN" is not a valid authorization ID. SQLSTATE=42602
If you ever find that your system has came through this error while accessing DB2 Universal Database™(UDB):
If you get this error then there is a need to verify that your username and password in the data source properties page in the administrative console are correct.
Make sure that the username and password do not contain blank characters between or prior or after.
Data Access Error 2: SQL0805N Package package-name was not found
The most possible reason for getting this error are -
If the package name is NULLID.SQLLC300, see SQL0805N Package “NULLID.SQLLC300” was not found. SQLSTATE=51002. for the reason.
When you try to use an XA-enabled JDBC driver on a DB2 database that is not XA-ready.
When you wish to solve this error on a DB2 Universal Database (UDB) then you are required to run this one-time procedure with the use of the sb2cmd interface while connected to the database in question:
DB2 bind @db2cli.lst blocking all grant public
DB2 bind @db2ubind.lst blocking all grant public
The db2ubind.lst and db2cli.lst files are in the bnd directory of your DB2 installation root. You can then run the commands from that specific directory.
Data Access Error 3: SQL0805N Package "NULLID.SQLLC300" was not found. SQLSTATE=51002
This error used to take place because Db2 was upgraded and its packages are not rebound correctly. This error also occurs due to the underlying database was dropped and recreated.
If you want to fix this error then there is a need to rebind the DB2 packages by running the db2cli.lst script that were generally found in the bnd directory.
Data Access Error 4: SQL30082N Attempt to establish connection failed with security reason "17" ("UNSUPPORTED FUNCTION") SQLSTATE=08001
This error can take place when the security mechanism as specified by the client is not valid for this server. Some of the typical examples for getting this error:
The client sent SERVER_ENCRYPT authentication information to a server that actually does not support password encryption.
The client sent a new password value to a server that does not support the change password option.
The client sent a username but not the password to a server that does not support authentication by username only.
In order to solve this error, at first, you have to make sure that your client and server uses the same security mechanism. As for example, if this is an error on your data source then you have to verify that you have assigned a username and password or authentication alias.
Data Access Error 5: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0911N
This problem is probably an application-caused DB2 deadlock, particularly if you see an error similar to the following when accessing a DB2 data source:
ERROR CODE: -911
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0911N
The current transaction has been rolled back because of a deadlock or timeout.
Reason code "2". SQLSTATE=40001
This error can be diagnosed by executing these DB2 commands, db2 get snapshot for LOCK on dbName>, db2 update monitor switches using LOCK ON. The directory_name\lock_snapshot.log now has the DB2 lock information. You can then turn off the lock monitor by simply running: db2 update monitor switches using LOCK OFF. Or if you want to verify that you have a deadlock, then you can look for an application handle that has a lock-wait status and then look for the ID of the agent that holds lock to verify the ID of the agent.
After this, you can then go to that handle to verify it has a lock-wait status and the ID of the agent holding the lock for it. This ID will be same as the previous one, then you can know that you have a circular lock.
In order to fix this error, you have to examine and use a less restrictive isolation level if no concurrency access is required. You have to use caution while changing the accessIntent value to move to a lower isolation level. However, this change can also result in data integrity issues. For DB2/UDB Version 7.2 and earlier releases, you can set the DB2_RR_TO_RS flag from the DB2 command line windows so that it can eliminate the unnecessary deadlocks like when the accessIntent defined on the bean method is too restrictive.
Data Acess Error 6: java.sql.SQLException: Failure in loading T2 native library db2jcct2 DSRA0010E: SQL State = null, Error Code = -99,999
This failure in loading message indicates one of the following issues:
A database operation was performed that uses a different scope than the configured data source. As for example, the testConnection command runs at the node level for a data source that actually exists on the server level. Source the db2profile script on the machine and make sure that the environment contains pointers to the DB2native libraries. The db2profile script exists on the root directory of the B2 user ID.
A machine was not rebooted after the installation of the DB2.Reboot the machine getting the error and then tries it again.
Conclusion:
The above mentioned are the most common data access errors found in DB2 Database. However, there are lots of reasons for getting these errors. There are different reasons for each of the data access error that takes place in Db2 database. Apart from these aforementioned errors, there are some other data access errors in DB2 database as well that takes place while accessing db2 database. However, these errors can be easily fixed with DB2 File Repair Tool. This tool has the capability to fix any kind of data access errors in db2 database as well as other included errors. To know about some about data access errors in DB2 Database, you can log on to: