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 > Db2cc on Linux ( My Systems and Databases are empty )

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-10, 08:17
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
Db2cc on Linux ( My Systems and Databases are empty )

Hello friends,

I'm starting with Db2, and I was trying to test db2 control center but I have a problem. When I start db2cc it opens normally but does not show any of my databases..nothing. I'm starting it from my instance and I believe it shouldn't be a problem.

Can anyone help me?

Rafael
Reply With Quote
  #2 (permalink)  
Old 09-27-10, 08:29
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What version of DB2? What version of Linux? As the instance owner, what is the output of the command "db2 list db directory"?

Andy
Reply With Quote
  #3 (permalink)  
Old 09-27-10, 10:37
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
Hello!

I'm using DB2 9.7 on Linux Mint ( Ubuntu Based ).

The output for db2 list db directory is:


db2 list db directory

System Database Directory

Number of entries in the directory = 4

Database 1 entry:

Database alias = MYDB1
Database name = MYDB1
Local database directory = /home/db2inst3
Database release level = d.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =

Database 2 entry:

Database alias = M1
Database name = MYDB1
Node name = DB2INST3
Database release level = d.00
Comment =
Directory entry type = Remote
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =

Database 3 entry:

Database alias = MYDB11
Database name = MYDB1
Node name = DB2INST3
Database release level = d.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =

Database 4 entry:

Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst3
Database release level = d.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Reply With Quote
  #4 (permalink)  
Old 09-27-10, 10:58
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I do not know what the problem is. It should work as you have stated how you run it.

Andy
Reply With Quote
  #5 (permalink)  
Old 09-27-10, 11:14
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
It should be automatically, right?

Does it has something to do with CATALOG?
Reply With Quote
  #6 (permalink)  
Old 09-27-10, 11:18
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes, if the DB is cataloged, then it should show up. The output you provided earlier showed 4 databases, sh those should show up as they are all cataloged. Can you connect to them as the instance owner from the command line?

Andy
Reply With Quote
  #7 (permalink)  
Old 09-27-10, 11:26
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
Yes, I do!

Check it out:


rafael ~ # db2 connect to mydb11 ( I tried to use the alias first )
SQL1097N The node name was not found in the node directory. SQLSTATE=42720
rafael ~ # db2 connect to mydb1

Database Connection Information

Database server = DB2/LINUXX8664 9.7.2
SQL authorization ID = ROOT
Local database alias = MYDB1


I also tried to catalog with another alias and I have this output ( I remember I had an error when I made the catalog procedure at the first time, don't remember if it is the same one. )

db2 catalog database mydb1 as mydb12 at node db2inst3 authentication server
SQL1100W The node name "db2inst3" specified in the Catalog Database command
has not been cataloged in the Node Directory.

Thanks!

Rafael
Reply With Quote
  #8 (permalink)  
Old 09-27-10, 11:28
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What is the instance owner username?

Andy
Reply With Quote
  #9 (permalink)  
Old 09-27-10, 11:37
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
is the db2inst3

This time I'm using the root user, but I exported the DB2INSTANCE varible like this:

export DB2INSNTANCE=db2inst3

Thanks

Rafael
Reply With Quote
  #10 (permalink)  
Old 09-27-10, 11:42
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If you do not use the instance owner on linux, you need to setup the DB2 environment properly. Just exporting DB2INSTANCE will not work. You need to run the profile script. If you try everything as the db2inst3 user, does it work?

Andy
Reply With Quote
  #11 (permalink)  
Old 09-27-10, 13:58
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
hi!

Ialready tested this way and also using the db2inst3 user. Still empty.
Reply With Quote
  #12 (permalink)  
Old 09-27-10, 14:12
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Login in as db2inst3 and from the command line and connect to mydb1. What is the result?

Andy
Reply With Quote
  #13 (permalink)  
Old 09-27-10, 14:17
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
db2 connect to mydb1

Database Connection Information

Database server = DB2/LINUXX8664 9.7.2
SQL authorization ID = DB2INST3
Local database alias = MYDB1


Works fine!
Reply With Quote
  #14 (permalink)  
Old 09-27-10, 14:19
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
From that same session, load the Control Center (db2cc). Are the databases present?

Andy
Reply With Quote
  #15 (permalink)  
Old 09-27-10, 14:49
rafaelmcosta rafaelmcosta is offline
Registered User
 
Join Date: Sep 2010
Posts: 16
I have this result:
$ db2cc
No protocol specified

Error: Can not open display


rafael:~ # xhost +
rafael:~ # su - db2inst3
db2inst3@rafael:~> export DISPLAY=:0.0
db2inst3@rafael:~> db2cc

Control Center starts, but still empty.
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