on 2009 Sep 02 8:34 AM
We are using DB2 UDB on Windows platform for Solution Manager EHP 1 (ABAP + JAVA) we are not able to connect to the database, the server is not restarting, when we try to connect to database R3trans -d, it gives (0012)return code. When trying to connect to db2 from command prompt it gives following SQL error
"SQL1390C The environment variable DB2INSTANCE is not defined or is invalid."
I have checked the Administration guide, and our DB2INSTANCE variable is valid (value db2sol). The db2diag.log file throws the following error :
DIA3202C The TCP/IP call "connect" returned an errno="10061".
Please let me know how to proceed futher.
Thanks a lot in advance.
ok, if we do, db2set -all, then what DB2SYSTEM variable shows ?
and what this shows ?
db2 ? SQL1390
Are we sure for value of DB2INSTANCE ? if you can compare the format with any other system in your landscape having DB2 ?
try executing $INSTHOME/sqllib/db2profile variable file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anjali,
db2set -all shows the below variables
[e] DB2DBDFT=SOL
[e] DB2PATH=E:\Program Files\IBM\SQLLIB
[g] DB2_EXTSECURITY=YES
[g] DB2SYSTEM=DEL-SM-01
[g] DB2PATH=E:\Program Files\IBM\SQLLIB
[g] DB2ADMINSERVER=DB2DAS00
db2 ? SQL1390 shows the same error
SQL1390C The environment variable DB2INSTANCE is not defined or is invalid.
variable INSTHOME is not set.
Hi Anshul,
on Windows there are no logon scripts that can be executed.
Please open a "db2cmd" window and execute "db2ilist" . It should show your DB2 instance db2sol.
After this you can try to connect to your database using DB2 CLP
db2 connect to SOL
Regards
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frank,
I am getting the same output from db2 CLP as well.
I want to add here that the database didn't restart after we applied the license provided by SAP Note 816773. We applied the license in sequence as per the note. db2licm -l changed the status from 'expired' to 'permanent' but still we are not able to get the database working. Are there any post license installation activities that we are missing here.
Thanks for your time.
Edited by: Anshul Dureja on Sep 3, 2009 1:18 PM
Anshul,
On a UNIX system the DB2INSTANCE variable is read from the default.env file in the installation path (or /var/db2/v81/default.env if its V8.x)
cat /opt/IBM/db2/V9.5/default.env
DB2SYSTEM='XXXXXXX'
DB2INSTDEF='db2xc1'
DB2ADMINSERVER='dasadm'
On a Windows system, I believe you can set the same variables in System Properties->Advanced->Environment Variables->System Variables. So in your case, you will need to create (or update) a variable called DB2INSTANCE and set it to DB2SOL (which is your default instance if I am not mistaken).
Let us know if this works for you.
Thanks,
Sameer
Hi Sameer,
Thanks for your response.
We have checked and the DB2INSTANCE variable is 'SET' on both the environments viz. soladm and db2sol. We checked using 'SET' command. Moreover, if we check the instance name with db2ilist it shows nothing. Is there anything wrong with the license, db2licm -l shows that it has been applied successfully but still dumps are coming in db2diag.log file.
Then, the question is what DB2INSTANCE is set to ...
if db2ilist returns nothing, then most probably no DB2 instance exists. Run db2icrt as documented in the DB2 Online Documentation to create the instance - e.g.
db2icrt -u <instance owner> -s ese db2<sid>
This is no problem with the license.
Malte
The issue resolved with following procedure :
1. Login as db2sol
2. Go to Start -> All Programs ->IBM DB2 -> SAPDB2SOL -> Command Line Tools -> Command Window
3. Now apply license here as per SAP Note 816773.
Even with db2cmd we were not getting the actual license status.
Thanks Frank for your valuable input.
Thanks all for your time and inputs.
Edited by: Anshul Dureja on Sep 7, 2009 5:25 PM
User | Count |
---|---|
69 | |
8 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.