Connection Error

1) We are having DB2 7.2 EE server on win NT 4 & win 2000

2) My friend started replication from source to target involving databases in the same DB2 instance of the same server.

3) I stopped the database manager forcing disconnect all applications accidentally. Now whatever I do I get the following error:

4) D:\PROGRA~1\SQLLIB\BIN>db2 list applications
SQL30081N  A communication error has been detected.  Communication protocol being used: "*".  Communication API being used: "*".  Location where the error was detected: "".  Communication function detecting the error: "create_agent".
Protocol specific error code(s): "54", "*", "*".  SQLSTATE=08001

5) The service for DB2 instance in control panel services shows as being stopped but when I try to start it shows it is already started.

6) Please help me avoid reinstall and restore processes.
LVL 17
k_murli_krishnaAsked:
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.

ghp7000Commented:
Have you tried to re boot the machine?
0
k_murli_krishnaAuthor Commented:
Yes I rebooted the machine and it has got solved. Does any inconsistency go away by a system reboot like this one. Actually the procedure for reboot or shutdown of system is:

> db2 list applications

If there are no applications, then

> db2stop

If there are running applications, can we go to control center, right click on each instance & stop the database manager forcing disconnect all applications like what i have done in this case.

In command window, db2stop will stop database manager for all instances where as in control center, we have to do it individually for each instance???
0
k_murli_krishnaAuthor Commented:
Please have a look at all my questions with or without comment. Latest one is 'Import from non-delimited ASCII file'.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

ghp7000Commented:
If you want to use the command line to forcibly disconnect applications from the database, you have a number of options. Please see the FORCE APPLICATION command for full details on how to use this command. As far as Control center is concerned, I have never used the CC to disconnect applications, but I'm sure it can be done.

In some cases, it may be impossible to kill active connections to the database. This usually happens when the DB2 agents get 'lost' in the instance's memory structures. This is what most likely happended in the case you describe above. If you have the database manager running at diaglevel 4, you may see some information messages in the db2diag.log file to help you diagnose what happended.

When you cannot shut down the instance or force all the applications off the database, you have 2 options:
issue db2_kill, this should force all the agents off the database and shut down the DB2 operating system services.
This avoids rebooting the machine, but IBM does not warranty the use of db2_kill.
Second option is to reboot the machine.

Depending upon some configuration parameters, crash recovery if needed will be initiated by the dbm to restore consistency. Of course, if you kill a long running update/insert query, some records may be written to the tables and some may not, depending upon the auto commit setting or program code.

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
ghp7000Commented:
Lastly:)
To stop an instance from command line:
db2ilist
DB2
DB2MPP
set db2instance=DB2
db2stop

setdb2instance=DB2MPP
db2stop
0
k_murli_krishnaAuthor Commented:
ghp7000, thank you very much. I will give more points but I have one last doubt.

1) When I use db2 list applications, db2stop and db2start in command window, it works for all instances nicely i.e. both services are start or stop at a time.

2) When I use your indiviual instance method, it is as follows:
db2ilist
DB2CTLSV
DB2
set db2instance=DB2
db2stop
db2start are okay. But

set db2instance=DB2CTLSV
db2stop is okay, but
C:\PROGRA~1\SQLLIB\BIN>db2start
SQL5043N  Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully.

What does this error signify and how can it be solved. The services are starting/stopping w.r.t. corresponding instances being started/stopped.
0
ghp7000Commented:
Yes, all this means is that the DB2COMM parameter is not set or set incorrectly. Issue:
db2 set -all
What is the value of DB2COMM? If it is not present, or set to anything other than TCPIP, you will get the above message.
To set the parameter, issue:
DB2SET DB2COMM=TCPIP
Then
db2stop
db2start
The DB2CTLSV instance is set up by default when you intsall DB2. You can avoid this (in some DB2 releases) by choosing CUSTOM setup when you install DB2.
Use db2set -h for help on using this command.
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.