This section describes solutions to the following common problems that can arise when using databases:
db2set DB2_RR_TO_RS=YES
If there is a second set of aggregation flows, these also use the same table.
If DB2_RR_TO_RS is not set, it is possible that one AggregateReply thread's updates will lock the next row in the database (a DB2 optimization). AdditionalInstances are threads available to process a message flow on any of its input nodes, in addition to the minimum number created. If there is only one aggregation flow in total, there might not be a problem. However, when you introduce multiple aggregate flows, deadlocks are possible (even without additional instances).
Use DB2_RR_TO_RS if aggregation is being used. The exception to this is if you have only one aggregation flow for each broker with no additional instances, and the message throughput is low.
connect to db
bind ~/sqllib/bnd/@db2cli.lst grant public CLIPKG 5
connect reset
where db is
the database name.
connect to db
bind x:\sqllib\bnd\@db2cli.lst blocking all grant public
connect reset
where x: identifies the drive onto which you installed DB2, and db is the database name.
db2 update dbm cfg using TP_MON_NAME MQ
XAOpenString=DB=databasename,UID=userid,PWD=password,AXLIB=library
AXLIB=mqmax
AXLIB=usr/mqm/lib/libmqmax_r.a
AXLIB=/opt/mqm/lib/libmqmax_r.sl
AXLIB=/opt/mqm/lib/libmqmax_r.so
AXLIB=/opt/mqm/lib/libmqmax.so
"SQL1040N The maximum number of applications is already connected to the database. SQLSTATE=57030"
DB2 has rejected the attempt to connect.
If this database is one of the defined broker databases, implying that a broker thread connection request has failed, the broker is probably not functioning correctly.
A database agent could not be started to service a request, or was terminated as a result of a database shutdown or force command.
db2set DB2COMM=tcpip db2stop db2start
db2svc1 3700/tcp # DB2 Connection Service db2isvc1 3701/tcp # DB2 Interrupt Service
db2 update dbm cfg using svcenamedb2svc1
where db2svc1 is the name of the DB2 Connection
port service in /etc/services. Alternatively, you can specify a port number directly.
db2stop db2start
db2 catalog tcpip node NODENAME remote HOSTNAME server db2svc1where:
Message DB20000I is displayed when the command completes successfully.
db2 catalog database DATABASE as DBALIAS at node NODENAMEwhere:
Specify the new alias name in all subsequent references to the local database, for example when you run the mqsicreatebroker command.
db2 terminate db2stop db2start
DBALIAS=IBM DB2 ODBC Driver
[DBALIAS] Driver=INSTHOME/sqllib/lib/libdb2.a Description=Broker Database Alias Database=DBALIASwhere INSTHOME is the path to your DB2 Instance directory.
mqsicreatebroker BrokerName -i mqsiuid -a mqsipw -q BrokerQueueManager -n DBALIAS -n
+(VCP0BRK) 0 BIP2048E: An Exception was caught while issuing database SQL command connect. +(VCP0BRK) 0 BIP2321E: Database error: ODBC return code '-1'. +(VCP0BRK) 0 BIP2322E: Database error: SQL State '58004'; Native Error Code '-99999'; Error Text ' DB2 for OS/390 ODBC Driver SQLSTATE=580 04 ERRLOC=2:170:4; +(VCP0BRK) 0 BIP2053E: The broker made an unsuccessful attempt to access its database DSN610P3 with userid PAICE.
The user ID of the started task is not authorized to use plan DSNACLI.
This might be caused by the user ID of the started task not being authorized to use the current SQL ID. Re-configure the broker and specify DB2_TABLE_NAME as a valid name, or create a RACF group and connect the started task user ID to this group.
The connection requirements for a single message broker are:
Connections for neighbors and publication nodes are required only if you are using retained publications.
SQLError( hEnv=0, hDbc=0, hStmt=1, pszSqlState=&302f8ecc, pfNativeError=&302f8ec8, pszErrorMsg=&28f6a6d0, cbErrorMsgMax=1024, pcbErrorMsg=&302f8eb4 ) SQLError( pszSqlState="51002", pfNativeError=-805, pszErrorMsg="{DB2 for OS/390} {ODBC Driver}{DSN06011} DSNT408I SQLCODE = -805, ERROR: DBRM OR PACKAGE NAME DSN610GH..DSNCLICS.16877- BE5086005F4 NOT FOUND IN PLAN DSNACLI. REASON 02 DSNT418I SQLSTATE = 51002 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNXEPM SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = -350 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'FFFFFEA2' X'00000000' X'00000000' X'FFFFFFFF' X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION
BIP2322E: DATABASE ERROR: SQL STATE '51002'; NATIVE ERROR CODE '-805'
BIP2731 Database statement 'INSERT INTO dbo.BRETAINEDPUBS VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' could not be executed. BIP2321 Database error: ODBC return code '-1'. BIP2322 Database error: SQL State '40001'; Native Error Code '1205'. Text '[SYBASE][ODBC Sybase Driver][SQL Server]Your server command (family id #0, process id #234) encountered a deadlock situation. Please re-run your command.'
isql -Uusername -Ppassword
use broker DSN
where broker
DSN is the ODBC Data Source Name (DSN) for the broker database.
alter table dbo.BRETAINEDPUBS lock datarows
where dbo is the schema name.go
Related tasks
Database security
Is there a problem with a database?
ODBC tracing
Dealing with problems
Related reference
mqsicreatebroker command
mqsideletebroker command
Database facilities
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
au16620_ |