IBM Support

Enabling Login Constraints 

Question & Answer


Question

How do you check and enable login constraints?

Answer

Introduced in NPS 4.6.5, login constraints allow a DBA to define how many concurrent sessions a user can have and the windows of time in which a user is allowed access to the system.

Are Login Constraints Already Enabled?

To determine if this feature is enabled, run the following command via nzsql or any ODBC or JDBC client:

    system(admin)=> show enable_login_constraints;

By default, this feature is disabled and thus would return the following:
    NOTICE:  enable_login_constraints is off

Enabling Login Constraints

Unlike most Postgres settings, enable_login_constraints cannot be modified after the server has started. Attempts to do so will produce the following error:
    system(admin)=> set enable_login_constraints = true;
    ERROR:  'enable_login_constraints' cannot be changed after server start

1. To change this, you need to modify the /nz/data/postgresql.conf file. If an entry already exists for enable_login_constraints, set the associated value for this parameter to be true. If an entry does not exist, add the following line:
    enable_login_constraints = true

2. Restart the NPS to put this change into effect:
    nzsystem restart -force

3. Once the system is online, confirm that the feature has been enabled using the following command:
    system(admin)=> show enable_login_constraints;
    NOTICE:  enable_login_constraints is on
    SHOW VARIABLE

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ266946

Document Information

Modified date:
17 October 2019

UID

swg21571222