cancel
Showing results for 
Search instead for 
Did you mean: 

Db2 : Coomand not found

Former Member
0 Kudos
404

Hi

I did a restore of my ignite backup, now when i try to "su - db2prd" its not giving me the db2prd prompt. and when i run any db2 command its saying command not found. what could be the problem

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

i have issued the command /opt/IBM/db2/V8.1/instance/db2iupdt -u db2prd and its giving me an error to check if i'm using the correct version of the db2iupdt, if i check in the installation folder that is the only db2iupdt in there, is there some wehere i can check again.

Thank you

Former Member
0 Kudos

Do you have a "sqllib" directory in the home directory for the instance owner? (db2prd?). If so, can you go into that directory and see where the symbolic link for "lib" is pointing to?

Thanks,

Sameer

Former Member
0 Kudos

Hi

I dont have the directory sqllib in the home directory, i have been trying to figure out how to restore it. thank you so much for the assistance

Former Member
0 Kudos

That might indicate that you dont have a db2 instance defined. You can create a new db2 instance by issuing the following commands from the software directory as root.

<DB2softwaredirectory>/instance/db2icrt -u db2prd db2prd

The software directory depends on which version of DB2 you intend to use.

Thanks,

Sameer

Former Member
0 Kudos

What do you see when you execute the following command as user db2prd (your instance owner):

which db2

The output should be something like:

<homedirofdb2prd>/sqllib/bin/db2

If you dont see that, then the instance environment is not set, the easiest fix for that is to rerun db2iupdt as root:

<db2installpath>/instance/db2iupdt -u <fenceduser> db2prd

Thanks,

Sameer