Advanced System Parameters View (xparmall.run)
Advanced System Parameters View
Section titled “Advanced System Parameters View”This script creates a comprehensive view that exposes Oracle’s hidden parameters along with their modifiability flags, default status, and descriptions. It provides much more detail than standard parameter queries.
Script: xparmall.run
Section titled “Script: xparmall.run”rem xparmall.runremcreate or replace view x_$system_parameters asselect x.indx+1 num, ksppinm name, ksppity type, ksppstvl value, ksppstdf isdefault, decode( bitand(ksppiflg/256,1), 1, 'TRUE', 'FALSE' ) isses_modifiable, decode( bitand(ksppiflg/65536,3), 1, 'IMMEDIATE', 2, 'DEFERRED', 'FALSE' ) issys_modifiable, decode( bitand(ksppstvf,7), 1, 'MODIFIED', 'FALSE' ) ismodifiable, decode( bitand(ksppstvf,2), 2, 'TRUE', 'FALSE' ) isadjusted, ksppdesc description from x$ksppi x, x$ksppsv y where x.indx = y.indx;remdrop public synonym x$system_parameters;create public synonym x$system_parameters for x_$system_parameters;grant select on x_$system_parameters to public;
What This Script Does
Section titled “What This Script Does”This script creates a comprehensive view that exposes Oracle’s internal parameter structure, including hidden and undocumented parameters. It provides detailed metadata about each parameter including:
- Parameter modifiability at session and system levels
- Whether parameters have been modified from defaults
- Whether parameters have been adjusted by Oracle
- Complete parameter descriptions
Run as a user with DBA privileges:
-- Execute the script to create the view@xparmall.run
-- Query all parametersSELECT * FROM x_$system_parameters ORDER BY name;
-- Find modifiable parametersSELECT name, value, isses_modifiable, issys_modifiableFROM x_$system_parametersWHERE isses_modifiable = 'TRUE' OR issys_modifiable != 'FALSE';
-- Find modified parametersSELECT name, value, isdefault, ismodifiableFROM x_$system_parametersWHERE isdefault = 'FALSE' OR ismodifiable = 'MODIFIED';
Required Privileges
Section titled “Required Privileges”- DBA or SYSDBA privileges
- CREATE VIEW privilege
- CREATE PUBLIC SYNONYM privilege
- GRANT privilege
Sample Output
Section titled “Sample Output”NUM NAME TYPE VALUE ISDEFAULT ISSES_MOD ISSYS_MOD ISMODIFIED ISADJUSTED--- ------------------------------ ---- ------------- --------- --------- --------- ---------- ---------- 1 _optimizer_mode_force 1 TRUE FALSE FALSE FALSE FALSE 2 _optimizer_undo_cost_change 1 10.4.1 TRUE FALSE FALSE FALSE FALSE 3 _trace_files_public 1 FALSE TRUE TRUE IMMEDIATE FALSE FALSE 4 sga_max_size 2 1073741824 FALSE FALSE IMMEDIATE MODIFIED TRUE 5 processes 3 300 FALSE FALSE FALSE MODIFIED FALSE
Key Output Columns
Section titled “Key Output Columns”Column | Description |
---|---|
NUM | Parameter sequence number |
NAME | Parameter name (including hidden parameters) |
TYPE | Parameter data type (1=boolean, 2=string, 3=integer, etc.) |
VALUE | Current parameter value |
ISDEFAULT | TRUE if parameter is at default value |
ISSES_MODIFIABLE | TRUE if modifiable at session level |
ISSYS_MODIFIABLE | IMMEDIATE/DEFERRED if modifiable at system level |
ISMODIFIABLE | MODIFIED if parameter has been changed |
ISADJUSTED | TRUE if Oracle automatically adjusted the value |
DESCRIPTION | Oracle’s internal parameter description |
Understanding the Parameters
Section titled “Understanding the Parameters”Parameter Types
Section titled “Parameter Types”- Type 1: Boolean parameters (TRUE/FALSE)
- Type 2: String parameters
- Type 3: Integer parameters
- Type 4: Parameter file parameters
- Type 5: Reserved
- Type 6: Big integer parameters
Modifiability Levels
Section titled “Modifiability Levels”- Session Modifiable: Can be changed with ALTER SESSION
- System Immediate: Can be changed with ALTER SYSTEM immediately
- System Deferred: Can be changed with ALTER SYSTEM but takes effect for new sessions
- Static: Requires database restart to change
Common Use Cases
Section titled “Common Use Cases”1. Find All Hidden Parameters
Section titled “1. Find All Hidden Parameters”SELECT name, value, descriptionFROM x_$system_parametersWHERE name LIKE '\_%' ESCAPE '\'ORDER BY name;
2. Review Non-Default Settings
Section titled “2. Review Non-Default Settings”SELECT name, value, isses_modifiable, issys_modifiable, descriptionFROM x_$system_parametersWHERE isdefault = 'FALSE'ORDER BY name;
3. Find Parameters Modified Since Startup
Section titled “3. Find Parameters Modified Since Startup”SELECT name, value, descriptionFROM x_$system_parametersWHERE ismodifiable = 'MODIFIED'ORDER BY name;
4. List Dynamically Modifiable Parameters
Section titled “4. List Dynamically Modifiable Parameters”SELECT name, value, isses_modifiable, issys_modifiable, descriptionFROM x_$system_parametersWHERE isses_modifiable = 'TRUE' OR issys_modifiable IN ('IMMEDIATE', 'DEFERRED')ORDER BY issys_modifiable, isses_modifiable, name;
5. Search for Specific Parameter Patterns
Section titled “5. Search for Specific Parameter Patterns”SELECT name, value, descriptionFROM x_$system_parametersWHERE UPPER(name) LIKE '%OPTIMIZER%' OR UPPER(description) LIKE '%OPTIMIZER%'ORDER BY name;
Performance Analysis
Section titled “Performance Analysis”This view is particularly useful for:
- Performance Tuning: Finding optimizer and memory-related hidden parameters
- Troubleshooting: Identifying parameters that may be causing issues
- Configuration Auditing: Reviewing all non-default settings
- Capacity Planning: Understanding memory and resource allocations
Security Considerations
Section titled “Security Considerations”- Limited Access: Grant access only to DBAs and senior developers
- Hidden Parameters: Many exposed parameters are undocumented and unsupported
- Modification Risk: Changing hidden parameters can cause instability
- Documentation: Always document any hidden parameter changes
Troubleshooting
Section titled “Troubleshooting”View Creation Fails
Section titled “View Creation Fails”-- Check if user has required privilegesSELECT * FROM session_privs WHERE privilege IN('CREATE VIEW', 'CREATE PUBLIC SYNONYM');
-- Verify x$ table accessSELECT COUNT(*) FROM x$ksppi WHERE rownum = 1;
No Hidden Parameters Shown
Section titled “No Hidden Parameters Shown”-- Verify view is properly createdDESC x_$system_parameters;
-- Check synonym accessSELECT COUNT(*) FROM x$system_parameters WHERE rownum = 1;
Integration with Other Scripts
Section titled “Integration with Other Scripts”This view works well with:
- Parameter Query Tool (xparm80.sql) - For formatted parameter lookups
- Parameter Descriptions (xparmdef.sql) - For parameter description queries
- Database Health Check (db.sql) - For comprehensive database analysis
Related Oracle Views
Section titled “Related Oracle Views”- V$PARAMETER - Standard documented parameters only
- V$SYSTEM_PARAMETER - System-level parameters
- V$PARAMETER2 - Multi-value parameters
- X$KSPPI - Internal parameter names (raw)
- X$KSPPSV - Internal parameter values (raw)
Best Practices
Section titled “Best Practices”- Create Once: Run this script once per database to create the view
- Regular Reviews: Periodically review non-default parameters
- Document Changes: Track any parameter modifications
- Test Thoroughly: Always test parameter changes in development first
- Oracle Support: Consult Oracle Support before modifying hidden parameters
This view provides unprecedented visibility into Oracle’s parameter system and is essential for advanced database administration and troubleshooting.