11/28/2017

How to resolve SQL20249N The statement was not processed error?

Hello All, recently we cloned the OS layer to build the DEV environment same as QA. As part of this, we prepared to restore the old DEV database backup into newly build DEV database. Then after the system support team will shut down the old DEV machine.

We restored the database to the new dev database and changed the hostname of the new server same as old one. So, the hostname change activity has to be done from DB side too. We did all the process and tried to connect from the Data Studio to test the connection establishment. We succeeded in connectivity, but while trying to get the list of tables Data Studio throws an error such as "Fetching the Schema failed"


Then, we tried to list the tables from the putty connection. It throws an error like "SQL20249N The statement was not processed because the package named "NULLID.SQLC2K26" needs to be explicitly rebound."

Issue:

SQL20249N The statement was not processed because the package named "NULLID.SQLC2K26" needs to be explicitly rebound 

Solution:

According to my research, I came to know that we need to rebind the package which is there in the error description.

db2 rebind <package name> RESOLVE CONSERVATIVE;

Once we rebind the above package we will be able to query the tables and all otherwise we cannot retrieve the data.

Next, we need to rebind the other packages using the below query.

db2 connect to SAMPLE

db2 -x "select 'REBIND PACKAGE ' || rtrim(pkgschema) || '.' || rtrim(pkgname) || ';' as command from syscat.packages" > rebind.sql

db2 -tvf rebind.sql

1 comment:

  1. One gets irritated when they face unexpected issues while bitcoin transaction in Binance. Such abrupt issues are unable to resolve and also put stop at the user’s works. In order to fix such issues, you can dial Binance support number +1877-330-7540 which is functional throughout the 365 days Binance Support NUmber in a year. The talented and nimble executives are at their best in providing commendable services to the users in minimal time.

    ReplyDelete

ads