Error in db2 v9.1 LUW

Hi

I am getting the below error when I tried to connect to a DB


$ db2 connect to cognos2
SQL1391N  The database is already in use by another instance of the database
manager.  SQLSTATE=51023

Please tell me possible solutions to resolve the issue..its very urgent
jmartin_vAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenData Warehouse Architect / DBACommented:

Hi Jmartin,

There's probably an old connection that's messing you up.

Run a terminate:

  db2 terminate

The try and connect again.



Kent
0
sathyaram_sCommented:
Had Kdo's suggestion helped ?

If not, have a look at the db2diag.log file. You are likely to find pointers to the cause.

If you are unsure (and you have backups and archive log files to rebuild the db if required) , then check if there is a  file called SQLINSLK  in the database directory of this database.

To identify the location of the file,


db2 list db directory

 System Database Directory

 Number of entries in the directory = 2

Database 1 entry:

 Database alias                       = xxx
 Database name                        = xxx
 Local database directory             = /home/xxx
 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                       = SAMPLE
 Database name                        = SAMPLE
 Local database directory             = /mnt/sample
 Database release level               = d.00
 Comment                              =
 Directory entry type                 = Indirect
 Catalog database partition number    = 0
 Alternate server hostname            =
 Alternate server port number         =

db2 list db directory on /mnt/sample

Database 1 entry:

 Database alias                       = SAMPLE
 Database name                        = SAMPLE
 Database directory                   = SQL00001
 Database release level               = d.00
 Comment                              =
 Directory entry type                 = Home
 Catalog database partition number    = 0
 Database partition number            = 0


The file will thus be in /mnt/sample/db2inst1/NODE0000/SQL00001 [ assuming db2inst1 is the instance name ]

Hope this helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kent OlsenData Warehouse Architect / DBACommented:
Hi jmartin,

Can you tell us what you found?


Thanks,
Kent
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.