How to find the DB2 instance name on Linux or UNIX server?
The easy way is to issue "db2ilist"
When you log on to unix or linx with a normal user ID, the user ID might not have access to DB2. So, when you issue db2ilist, the command will not be recognized.
How to over come this?
Step 1: Find out where is DB2 installed?
/usr/local/bin/db2ls -c
db2ls will list installed db2 product.
Copy the directory name listed from the output of the command and go to that directory using "cd".
Step 2: Go to the instance directory
From the db2 installed directory, change directory (cd) to "instance" (Issue: "cd instance").
Now, from the instance directory issue: "sh db2list".
The above command will give you the db2 instance name.
This DB2 instance name can be used for "sesu" or "dzdo su" depending on the OS.
Simply:
Go to /opt/ibm/"ver"/instance
Execute "sh db2ilist"
The easy way is to issue "db2ilist"
When you log on to unix or linx with a normal user ID, the user ID might not have access to DB2. So, when you issue db2ilist, the command will not be recognized.
How to over come this?
Step 1: Find out where is DB2 installed?
To find this issue the following command on the home directory (or any directory) on the linux/unix server:
/usr/local/bin/db2ls -c
db2ls will list installed db2 product.
Copy the directory name listed from the output of the command and go to that directory using "cd".
Step 2: Go to the instance directory
From the db2 installed directory, change directory (cd) to "instance" (Issue: "cd instance").
Now, from the instance directory issue: "sh db2list".
The above command will give you the db2 instance name.
This DB2 instance name can be used for "sesu" or "dzdo su" depending on the OS.
Simply:
Go to /opt/ibm/"ver"/instance
Execute "sh db2ilist"
No comments:
Post a Comment