DBAtlas · Database operations atlas

List non-default settings

Oracle

SELECT name, value, isdefault
FROM v$parameter
WHERE isdefault = 'FALSE'
ORDER BY name;

Rows in v$parameter with isdefault = 'FALSE' show parameters that differ from the default (set explicitly).

PostgreSQL

SELECT name, setting, unit, source
FROM pg_settings
WHERE source NOT IN ('default', 'override')
ORDER BY name;

If pg_settings.source is anything other than 'default' and 'override', the setting was changed by a configuration file, the command line or the session.

MySQL

SHOW GLOBAL VARIABLES;
-- MySQL does not automatically compare variables with defaults; with performance_schema
-- you can see the source of each setting:
SELECT VARIABLE_NAME, VARIABLE_SOURCE, VARIABLE_VALUE
FROM performance_schema.variables_info
WHERE VARIABLE_SOURCE <> 'COMPILED';

SHOW GLOBAL VARIABLES returns all settings; it does not show the difference from defaults directly. The VARIABLE_SOURCE column of performance_schema.variables_info shows changes other than the compiled default (file, command line, dynamic).

SQL Server

SELECT name, value, value_in_use, is_dynamic, is_advanced
FROM sys.configurations
WHERE value <> value_in_use
ORDER BY name;
-- value <> value_in_use: changes not yet RECONFIGUREd or awaiting a restart (is_dynamic = 0).

sys.configurations returns server settings; if value and value_in_use differ, there is a change not applied with RECONFIGURE (or awaiting a restart). sys.configurations does not store the default value (minimum/maximum is only the allowed range); to see differences from defaults, compare values with the documented defaults.

MongoDB

db.adminCommand({ getCmdLineOpts: 1 })
// The 'parsed' field shows settings explicitly provided (configuration file/command line) beyond the defaults.

The 'parsed' section of the getCmdLineOpts command lists only explicitly specified (non-default) settings.

Redis

CONFIG GET *
# Redis lists all settings but does not compare them with defaults.
# To see differences, compare the output with the default redis.conf values for your version.

CONFIG GET * returns all running settings; it has no built-in diff against defaults, so compare the output with the default redis.conf values of the relevant version.

Elasticsearch

GET _cluster/settings
// Returns only explicitly set persistent and transient settings.
// For everything including defaults: GET _cluster/settings?include_defaults=true&flat_settings=true

_cluster/settings returns non-default (persistent/transient) cluster settings; with include_defaults=true, defaults are also shown for comparison.

Open in DBAtlas →