Audit Current Global Variable Values Against Defaults

Suresh Ramagiri -

It's useful to compare global variable settings against the default in many cases. The best practice is to check these:

  • Before an upgrade
  • After an Upgrade
  • When encountering issues

We use the following query to check globals against the defaults. This ignores a few globals that are always different than the default, like license and cluster_id:

SQL> SELECT name, 
       value, 
       default_value 
FROM   system.global_variables 
JOIN   system.global_variable_definitions 
USING  (name) 
WHERE  value != default_value 
AND    name NOT IN ('cluster_ssh_key_private', 
                    'cluster_ssh_key_public', 
                    'cluster_host_key_public', 
                    'cluster_host_key_private', 
                    'cluster_vip', 
                    'cluster_vip_enabled', 
                    'server_id', 
                    'cluster_name', 
                    'version', 
                    'format_version', 
                    'cluster_vip_director', 
                    'cluster_vip_external', 
                    'customer_name', 
                    'session_log_bad_queries', 
                    'session_log_slow_queries', 
                    'session_log_slow_threshold_ms', 
                    'view_strmaps_upgraded', 
                    'global_variables_ignored_version', 
                    'cluster_id', 
                    'license');
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk