I am trying to execute the following Stored Procedure from my DB2 8.1 server Command center.
CREATE PROCEDURE DYNAPROCTEST_Distributed( )
DECLARE stmt VARCHAR(200);
DECLARE s2 VARCHAR(1000);
SET stmt = ' insert into TEMpGroup(carrierdrid,name,effectivedate,id) select * from group_view order by name';
PREPARE s2 FROM stmt;
TEMpGroup is a NickName for a table in a second DB2 database in the same server.
I have a Federated wrapper(Type DRDA) in my federated database using which I am sending distributed request. For simple SQL statement it works fine.
But whenever I am executing the above stored procedure it throws the following exception.
SQL1224N A database agent could not be started to service a
request, or was terminated as a result of a database system
shutdown or a force command.
The message may be attributed to any of the following cases.
o The database manager has not been started on the database
o The database manager was stopped
o The database manager has already allocated the maximum number
o The database agent was forced off by the system
o The database agent was terminated due to an abnormal
termination of a key database manager process
o The application is using multiple contexts with local
protocol. In this case the number of connections is limited
by the number of shared memory segments to which a single
process can be attached. For example, on AIX, the limit is
ten shared memory segments per process.
o A user with SYSADM authority issued a FORCE QUIESCE command
while you were connected. Because your user ID does not have
CONNECT QUIESCE authority for the database/instance or belong
to a group that has CONNECT QUIESCE authority, you were
disconnected from the database/instance.