?
Solved

Connection Error

Posted on 2003-02-25
7
Medium Priority
?
483 Views
Last Modified: 2012-08-13
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.
0
Comment
Question by:k_murli_krishna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 13

Expert Comment

by:ghp7000
ID: 8025916
Have you tried to re boot the machine?
0
 
LVL 17

Author Comment

by:k_murli_krishna
ID: 8026045
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
 
LVL 17

Author Comment

by:k_murli_krishna
ID: 8026056
Please have a look at all my questions with or without comment. Latest one is 'Import from non-delimited ASCII file'.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 13

Accepted Solution

by:
ghp7000 earned 600 total points
ID: 8034140
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
 
LVL 13

Expert Comment

by:ghp7000
ID: 8034153
Lastly:)
To stop an instance from command line:
db2ilist
DB2
DB2MPP
set db2instance=DB2
db2stop

setdb2instance=DB2MPP
db2stop
0
 
LVL 17

Author Comment

by:k_murli_krishna
ID: 8040747
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
 
LVL 13

Expert Comment

by:ghp7000
ID: 8044938
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

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question