This section describes solutions to the following common problems that can arise when using databases:
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:
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
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
au16620_ |