This was a new one for me, so I thought I’d write up a quick blog entry on it. After creating a new instance and a new database, and even after executing one db2set command successfully, I got this:
> db2set DB2_CAPTURE_LOCKTIMEOUT=YES DBI1306N The instance profile is not defined. Explanation: The instance is not defined in the target machine registry. User response: Specify an existing instance name or create the required instance.
On googling, I found this technote:
http://www-01.ibm.com/support/docview.wss?uid=swg1IC67080
And to resolve the issue, I ran a db2iupdt (this requires a db2instance outage). First as the db2 instance owner:
> db2stop force 06/27/2012 16:28:45 0 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. > ipclean ipclean: Removing DB2 engine and client's IPC resources for db2inst1. > db2licd -end
Then login as root and do:
> cd /opt/IBM/db2 > cd V9.7 > cd instance > ./db2iupdt -k -e db2inst1 DBI1070I Program db2iupdt completed successfully. > ./dasupdt SQL4410W The DB2 Administration Server is not active. SQL4406W The DB2 Administration Server was started successfully. DBI1070I Program dasupdt completed successfully.
Then, finally, as db2inst, verify it worked:
> db2start 06/27/2012 16:31:39 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful. > db2set DB2_CAPTURE_LOCKTIMEOUT=YES > db2set -all [i] DB2_CAPTURE_LOCKTIMEOUT=YES [i] DB2_OPT_MAX_TEMP_SIZE=10240 [DB2_WORKLOAD] [i] DB2_WORKLOAD=WC [i] DB2_SKIPINSERTED=YES [DB2_WORKLOAD] [i] DB2_OPTPROFILE=YES [DB2_WORKLOAD] [i] DB2_USE_ALTERNATE_PAGE_CLEANING=ON [i] DB2_INLIST_TO_NLJN=YES [O] [i] DB2_MINIMIZE_LISTPREFETCH=YES [DB2_WORKLOAD] [i] DB2_REDUCED_OPTIMIZATION=INDEX,UNIQUEINDEX,JOIN,NO_SORT_MGJOIN,JULIE [DB2_WORKLOAD] [i] DB2_EVALUNCOMMITTED=YES [DB2_WORKLOAD] [i] DB2_ANTIJOIN=EXTEND [DB2_WORKLOAD] [i] DB2_SKIPDELETED=YES [DB2_WORKLOAD] [i] DB2BIDI=ON [i] DB2COMM=TCPIP [i] DB2_PARALLEL_IO=* [g] DB2FCMCOMM=TCPIP4 [g] DB2SYSTEM=redacted [g] DB2INSTDEF=redacted [g] DB2ADMINSERVER=redacted
Overall, not a complicated problem
Hi Ember,
On Linux Environment,we installed Db2 11.1.4.5 version.Generally during instance creation time DB2INSTDEF profile registry variable will be set.But in my case DB2INSTDEF variable is not set.then i tried with db2set manually as root user getting error.
db2set -g DB2INSTDEF=db2inst1
-bash: db2set: command not found
Please tell me how to set mentioned variable as root user.
Regards,
Hanumanth
As root, you’ll need to source the db2profile so you can run the db2set command.
You’ll have to replace $INSTHOME with your instance home directory in the command above, as it will not be set for root.
Not entirely sure DB2INSTDEF actually means anything on LINUX – the command reference says it only applies to Windows.