How to block database connections

19 July,2017 by Jack Vamvas

During a recent consultation there was a requirement to block DB2 LUW database connections. The purpose was to test monitoring alerts and assess the correct response when a database connection could not be established.

The requirement was to maintain the DB2 instance active and all the other databases as online

An easy way to block database connections is to use the MAXAPPLS database configurable. This parameter specifies the maximum number of concurrent applications that can be connected (both local and remote) to a database.

The trick is to set the DB2 LUW database MAXAPPLS configurable to 1, and ensure that you obtain the database connection. Any other database connection will fail, regardless of whether it is remote or local.

You may discover some issues applying MAXAPPLS to 1. Adjusting MAXAPPLS is closely associated to MAXLOCKS . But the decisions to adjust the MAXLOCKS is dependant on how you currently have the database configured   

db2 update db cfg for MTTESTDB using MAXAPPLS 1

 

 

Author: Jack Vamvas(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to block database connections

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright