If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > I can't execute db2 command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-27-09, 14:21
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
I can't execute db2 command

Hİ.
I'm new with DB2. When I login as instance db2inst1. I want to create database and table, in short I want to execute query but when I write db2 ..... There appear an error:
SQL10007N Message "-1390" couldn't be retrieved. Reason code "5".

Please help me soon...
Thanks
Reply With Quote
  #2 (permalink)  
Old 02-27-09, 14:44
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What is you DB2 version and OS?

Andy
Reply With Quote
  #3 (permalink)  
Old 02-27-09, 15:31
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
DB2 V9.5 and I use Linux(Pardus)
Reply With Quote
  #4 (permalink)  
Old 02-27-09, 15:44
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
What is the output of "db2ilist"?
Reply With Quote
  #5 (permalink)  
Old 02-27-09, 15:52
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
there isnt any error about instance I have one instance named db2inst1
Reply With Quote
  #6 (permalink)  
Old 02-27-09, 16:41
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I assume you created the instance when you installed DB2. Did you install any fixpacks? What is the output of db2level? Did you issue db2start?

Andy
Reply With Quote
  #7 (permalink)  
Old 02-27-09, 16:44
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
do you login directly as db2inst1 or do you "su" from another user id?

try to source db2profile
. sqllib/db2profile


.profile should be doing it for you if you login correctly.
Reply With Quote
  #8 (permalink)  
Old 02-27-09, 16:45
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I'm thinking that your shell fails to execute the DB2 profile script, which should reside in ~/sqllib/db2profile

Make sure you source it when executing, e.g. add the following to your shell profile:

Code:
. ~/sqllib/db2profile
Reply With Quote
  #9 (permalink)  
Old 02-27-09, 17:09
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
--I created instance while installing db2. and I execute also db2start command.
--I tried both directly login as db2inst1 and login using su from other user id. I login correctly, there isnt problem on login in.
-I execute db2level command and appeared:

DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL09050" with level identifier "03010107".
Informational tokens are "DB2 v9.5.0.0","s071001","LINUXIA3295", and Fİx Pack "0".
Product is installed at "/opt/ibm/db2/v9.5".
Reply With Quote
  #10 (permalink)  
Old 02-27-09, 17:22
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
did you try to source db2profile?

also, verify that your .profile has the following:

# The following three lines have been added by UDB DB2.
if [ -f sqllib/db2profile ]; then
. sqllib/db2profile
fi
Reply With Quote
  #11 (permalink)  
Old 02-27-09, 18:24
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
how can I source db2profie.
Moreover I looked profile and found these lines:

if [ -f ${INSTHOME?}/sqllib/userprofile ]; then
. ${INSTHOME?}/sqllib/userprofile
fi
Reply With Quote
  #12 (permalink)  
Old 02-28-09, 11:33
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
My log file is:

Installing DB2 file sets:.......Success
Setting DB2 library path:.......Success
Executing control tasks:.......Success
Updating global registry:.......Success
Updating the db2ls link:.......Success
Registering DB2 licenses:.......Success
Setting default global profile registry variables:.......Success
Initializing instance list:.......Success
Configuring DB2 instances:.......Success
Updating global profile registry:.......Success

================================================== ==========

DB2 Setup log file started at: Sat Feb 28 18:24:49 2009 EET
================================================== ==========

Operating system information: Linux 2.6.25.20-114.#1 SMP Mon Jan 19 15:02:57 EET 2009 i686
The DB2 installer could not find the IBM Tivoli System Automation for
Multiplatforms Base Component (SA MP Base Component) on the DB2 install media.
The SA MP Base Component should be located at db2/<platform>/tsamp sub
directory under the top directory of the DB2 install media. If you want to use
the SA MP Base Component with the DB2 HA feature, see the SA MP Base Compoenent
Installation and Configuration Guide for information about how to manually
install the SA MP Base Component.

Product to install: IBM DB2 Express Edition
Installation type: Typical
Previously Installed Components:
Base client support
Java support
SQL procedures
Base server support
IBM Software Development Kit (SDK) for Java(TM)
Communication support - TCP/IP
Replication tools
Control Center
DB2 data source support
DB2 LDAP support
DB2 Instance Setup wizard
First Steps
Sample database source
Selected Components:

Languages:
English(already installed)

Target directory: /opt/ibm/db2/V9.5

Space required: 0 MB
Install SA MP Base Component: No

Existing instances to configure:
Instance name: db2inst1
Start instance on reboot: Yes
Instance user information:
User name: db2inst1
UID: 1002
Group name: db2iadm1
Home directory: /home/db2inst1



Response file name: /root/db2exp.rsp

Installing DB2 file sets:.......Success
Setting DB2 library path:.......Success
Executing control tasks:.......Success
Updating global registry:.......Success
Updating the db2ls link:.......Success
Registering DB2 licenses:.......Success
Setting default global profile registry variables:.......Success
Initializing instance list:.......Success
Configuring DB2 instances:.......Success
Updating global profile registry:.......Success
Reply With Quote
  #13 (permalink)  
Old 02-28-09, 12:22
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I recommend that you work through the "First Steps" that come with DB2.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #14 (permalink)  
Old 02-28-09, 13:58
fourthedition fourthedition is offline
Registered User
 
Join Date: Feb 2009
Posts: 30
when I use db2cc and use control center and write a query there become
?
?

message.
Reply With Quote
  #15 (permalink)  
Old 02-28-09, 14:36
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Log out of Linux, and then log back in so you are at your home directory.

Then type pwd and post the results.
Then type: ls -all and post the results.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On