SET SYSTEM DEFAULT

Use the SET SYSTEM DEFAULT command to the system defaults for session timeout, rowset limit, query timeout, and materialized view refresh threshold.

The system calculates the values at session startup and they remain in effect during the session.

You can also set session timeout, rowset limits, and query timeout at the user level, group level, or both. The runtime resolution for these values is:
  • The value that is assigned to the user
  • The minimum values assigned to groups of which the user is a member
  • The default system value.

Syntax

Syntax for setting the system default:
SET SYSTEM DEFAULT
[SESSIONTIMEOUT | ROWSETLIMIT | QUERYTIMEOUT ] TO [ <number> |
  UNLIMITED ]
[DEFPRIORITY | MAXPRIORITY ] TO    [critical | high | normal | low |
SET SYSTEM DEFAULT MATERIALIZE [REFRESH] THRESHOLD TO <number>
SET SYSTEM DEFAULT PASSWORDEXPIRY TO pwdexpiry
SET SYSTEM DEFAULT PASSWORDPOLICY TO <conf>
SET SYSTEM DEFAULT TIME_TRAVEL_ENABLED TO <boolean>
SET SYSTEM DEFAULT DATA_VERSION_RETENTION_TIME TO <number-of-days>

Inputs

The SET SYSTEM DEFAULT command takes the following inputs:

Table 1. SET SYSTEM DEFAULT inputs
Input Description
SESSIONTIMEOUT The amount of time a session can be idle before the system terminates it. You can specify 1 - 35,791,394 minutes or 0 or UNLIMITED for unlimited.
ROWSETLIMIT The number of rows a query can return. You can specify 1 - 2,147,483,647 rows or 0 or UNLIMITED for unlimited.
QUERYTIMEOUT The amount of time a query can run before the system sends the administrator a message. You can specify 1 - 35,791,394 minutes or 0 or UNLIMITED for unlimited.

To receive a message, you must enable the RunAwayQuery event rule. For more information, see the IBM® Netezza® System Administrator’s Guide.

DEFPRIORITY The default priority for the system. The valid priorities are critical, high, normal, and low.
MATERIALIZE THRESHOLD The percentage of unsorted data in a materialized view above which that view is automatically refreshed. When you refresh a base table, all associated materialized views that exceed this threshold are automatically refreshed. Including the phrase REFRESH in this parameter is optional and has no effect.
MAXPRIORITY The maximum priority for the system.
PASSWORDEXPIRY Sets the global password expiration default parameter to an n number of days. The n count begins with the date of the last password change. A 0 indicates that the passwords do not expire.
PASSWORDPOLICY Sets the configuration string parameter for the global password policy, and can take the following options, all of which take an integer:
minlen
Specifies a minimum length of x characters (x must be greater than 0). The default and minimum is 6, and a setting of less than 6 is ignored.

The following options must all be an integer. For more information about the meaning and usage of each, see the IBM Netezza Advanced Security Administrator's Guide.

lcredit
A lowercase credit. The default is 1.
ucredit
An uppercase credit. The default is 1.
dcredit
A digit credit. The default is 1.
ocredit
Other credit. The default is 1.

If options are not set, the default values determine the policy. These options are based on those for pam.cracklib (8). For more information, see the Linux® documentation.

TIME_TRAVEL_ENABLED Available in Netezza Performance Server 11.2.2.0 and higher. Specifies whether to enable or disable temporal tables.

The option following the parameter must be a boolean.

The boolean can be true, false, on, off, yes, no, 1, 0.

Retention time interval commands and temporal queries return ERROR if TIME_TRAVEL_ENABLED is OFF.

The initial, default value is OFF. It must be set to ON to use any time travel functionality.

If TIME_TRAVEL_ENABLED is set from ON to OFF, existing temporal tables retain their retention time intervals and historical rows. That information is available again when TIME_TRAVEL_ENABLED is set from OFF to ON.

DATA_VERSION_RETENTION_TIME The value of the property at system level determines the default value that is inherited by a subsequent CREATE DATABASE statement that does not explicitly specify this property.

The maximum allowed value is 92 days, which is the maximum number of days in a calendar quarter.

Output

The SET SYSTEM DEFAULT command has the following output:

Table 2. SET SESSION DEFAULT output
Output Description
SET SYSTEM DEFAULT The command was successful.

Privileges

You must be the admin user, or your account must have the MANAGE SYSTEM privilege.

Usage

The following provides sample usage.
  • To set the system default timeout to five hours (300 minutes):
    MYDB.SCH1(USER)=> SET SYSTEM DEFAULT SESSIONTIMEOUT TO 300;