I executed this script in DB2 10.1, and after that, I do not know how to reestablish the database connection:
script.sql
--#SET TERMINATOR @
SET CURRENT SCHEMA BLOCK_DB @
CREATE PROCEDURE BLOCK_DB.A ()
BEGIN
END @
CREATE PROCEDURE BLOCK_DB.B ()
BEGIN
CALL BLOCK_DB.A ();
END @
--#SET TERMINATOR ;
UPDATE DB CFG USING CONNECT_PROC BLOCK_DB.B;
DROP PROCEDURE BLOCK_DB.A ();
CONNECT RESET;
I executed like this
db2 -tf script.sql
After that, I tried to reconnect, but it was unsuccessful.
db2 connect to sample
DO NOT TRY THIS IN A PRODUCTION ENVIRONMENT.
Simply reset the value of
CONNECT_PROC:You do not need to have a database connection to execute this statement. This will set CONNECT_PROC back to the default (NULL), and you’ll be able to connect to the database again.