The technology of running external programs on the server side of a re
lational database management system (RDBMS) has been developed in the
past few years. Database 2(TM)/Common Server (DB2(TM)/CS) for UNIX(TM)
-based platforms supports external programs (i.e., user-defined functi
ons and stored procedures) that are written by the application develop
er in a third-generation language such as C or C++. The main difficult
y in debugging these external programs is that they are executed under
the control of DB2/CS, which is itself a large software system for wh
ich no source code is provided. If is therefore impractical for a debu
gger to penetrate through the layers of software of DB2/CS to locate a
nd debug the external programs. It is also very difficult for the debu
gger to determine when an external program will be invoked by the data
base engine and in which process it will be run. In addition, in an en
vironment where the DS2/CS server is shared between a large number of
users, if is necessary to ensure that the debugger does not violate th
e security of the DB2/CS system. In this paper, we describe a set of e
xtensions to a distributed debugger and DB2/CS to support the debuggin
g of external programs. A prototype was implemented to show the feasib
ility of the proposed approach.