ORA-32004: Obsolete or Deprecated Parameter - Clean Up SPFILE After Upgrade
ORA-32004: Obsolete or Deprecated Parameter
Section titled “ORA-32004: Obsolete or Deprecated Parameter”Error Overview
Section titled “Error Overview”Error Text: ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
The ORA-32004 error (technically a warning, not a hard error) is written to the alert log during database startup when Oracle detects one or more initialization parameters in the SPFILE or PFILE that are obsolete, deprecated, or no longer recognised in the current database version. While the database will still start successfully, the presence of these parameters indicates a configuration hygiene problem that can mask real issues, cause unexpected behaviour, and should be resolved before the next database upgrade.
Common Causes
Section titled “Common Causes”1. Post-Upgrade Parameter Cleanup Not Performed
Section titled “1. Post-Upgrade Parameter Cleanup Not Performed”- Parameters valid in Oracle 11g or 12c that were removed or renamed in 19c or 21c
- Database upgraded from an older version without reviewing and cleaning the SPFILE
- SPFILE cloned from an older environment without parameter validation
- Parameters flagged as deprecated in one version became fully obsolete in the next
2. Manually Added Obsolete Underscore Parameters
Section titled “2. Manually Added Obsolete Underscore Parameters”- Hidden parameters (
_parameter_name) added for a specific bug workaround in an older version - Workaround parameters no longer needed but never removed after applying a patch
- Test or diagnostic parameters left in the SPFILE by a previous DBA
3. Version-Specific Parameter Removals
Section titled “3. Version-Specific Parameter Removals”PARALLEL_SERVERreplaced byCLUSTER_DATABASEin RACLOG_ARCHIVE_STARTremoved when archiving became controlled byARCHIVELOGmodeMAX_ENABLED_ROLESobsoleted in 10gBACKGROUND_DUMP_DESTandUSER_DUMP_DESTreplaced byDIAGNOSTIC_DESTin 11gOPTIMIZER_ADAPTIVE_FEATURESsplit into multiple granular parameters in 12.2
4. Incorrect Parameter Names
Section titled “4. Incorrect Parameter Names”- Typographical errors in parameter names treated as unknown/obsolete
- Parameters from third-party documentation that do not exist in Oracle
- Case sensitivity issues in PFILE-based configurations on case-sensitive OS platforms
5. Parameters Deprecated in the Current Version
Section titled “5. Parameters Deprecated in the Current Version”UTL_FILE_DIRdeprecated (use Oracle Directory objects instead)OS_AUTHENT_PREFIXandREMOTE_OS_AUTHENTdeprecated for security reasonsSEC_CASE_SENSITIVE_LOGONdeprecated in 12.2 (case-sensitive passwords are now mandatory)
Diagnostic Queries
Section titled “Diagnostic Queries”Identify Obsolete and Deprecated Parameters
Section titled “Identify Obsolete and Deprecated Parameters”-- Query V$OBSOLETE_PARAMETER to find all obsolete parametersSELECT name, isspecified, isdeprecated, isobsolete, descriptionFROM v$obsolete_parameterWHERE isspecified = 'TRUE'ORDER BY name;
-- Parameters currently in effect that are deprecatedSELECT name, value, description, isdefault, ismodifiedFROM v$parameterWHERE name IN ( SELECT name FROM v$obsolete_parameter WHERE isdeprecated = 'TRUE')ORDER BY name;Check the SPFILE for All Non-Default Parameters
Section titled “Check the SPFILE for All Non-Default Parameters”-- View all parameters explicitly set in the SPFILESELECT name, value, display_value, description, isdefault, ismodifiedFROM v$spparameterWHERE isspecified = 'TRUE'ORDER BY name;
-- Compare SPFILE values against current effective valuesSELECT sp.name, sp.value AS spfile_value, p.value AS current_value, p.descriptionFROM v$spparameter spLEFT JOIN v$parameter p ON sp.name = p.nameWHERE sp.isspecified = 'TRUE'ORDER BY sp.name;Review the Alert Log for ORA-32004 Details
Section titled “Review the Alert Log for ORA-32004 Details”-- Find ORA-32004 entries and surrounding context in the alert logSELECT originating_timestamp, message_textFROM v$diag_alert_extWHERE message_text LIKE '%ORA-32004%' OR message_text LIKE '%deprecated%' OR message_text LIKE '%obsolete%'ORDER BY originating_timestamp DESCFETCH FIRST 100 ROWS ONLY;
-- The alert log typically lists the specific parameter names:-- ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance-- Deprecated/obsolete parameters in this instance:-- rdbms_server_dn-- utl_file_dirCheck for Hidden (Underscore) Parameters in SPFILE
Section titled “Check for Hidden (Underscore) Parameters in SPFILE”-- List all underscore parameters explicitly set in SPFILESELECT name, value, descriptionFROM v$spparameterWHERE isspecified = 'TRUE' AND name LIKE '\_%' ESCAPE '\'ORDER BY name;
-- Check if any of these underscore parameters correspond to known bug workarounds-- Cross-reference with My Oracle Support before removingSELECT name, value, isdefaultFROM v$parameterWHERE name LIKE '\_%' ESCAPE '\' AND isdefault = 'FALSE'ORDER BY name;Identify Parameters Changed Across Oracle Versions
Section titled “Identify Parameters Changed Across Oracle Versions”-- Parameters in the SPFILE that are not in v$parameter (truly obsolete)SELECT sp.name, sp.valueFROM v$spparameter spWHERE sp.isspecified = 'TRUE' AND sp.name NOT IN (SELECT name FROM v$parameter) AND sp.name NOT LIKE '\_%' ESCAPE '\'ORDER BY sp.name;
-- Deprecated parameters with non-default valuesSELECT p.name, p.value, p.description, p.ismodifiedFROM v$parameter pWHERE p.isdeprecated = 'TRUE' AND p.isdefault = 'FALSE'ORDER BY p.name;Step-by-Step Resolution
Section titled “Step-by-Step Resolution”1. Generate a Complete List of Parameters to Remove
Section titled “1. Generate a Complete List of Parameters to Remove”Before making any changes, document all currently set parameters:
-- Export current SPFILE to a PFILE for review and backupCREATE PFILE='/tmp/pfile_backup_YYYYMMDD.ora' FROM SPFILE;
-- Review the file at OS level:-- cat /tmp/pfile_backup_YYYYMMDD.ora
-- Identify which parameters appear in v$obsolete_parameter with isspecified=TRUESELECT name, isdeprecated, isobsolete, descriptionFROM v$obsolete_parameterWHERE isspecified = 'TRUE'ORDER BY isobsolete DESC, name;2. Remove Obsolete Parameters from the SPFILE
Section titled “2. Remove Obsolete Parameters from the SPFILE”-- Remove a fully obsolete parameter from the SPFILEALTER SYSTEM RESET log_archive_start SCOPE=SPFILE;ALTER SYSTEM RESET background_dump_dest SCOPE=SPFILE;ALTER SYSTEM RESET user_dump_dest SCOPE=SPFILE;ALTER SYSTEM RESET utl_file_dir SCOPE=SPFILE;ALTER SYSTEM RESET os_authent_prefix SCOPE=SPFILE;ALTER SYSTEM RESET remote_os_authent SCOPE=SPFILE;ALTER SYSTEM RESET sec_case_sensitive_logon SCOPE=SPFILE;
-- Verify the parameter was removedSELECT name, isspecifiedFROM v$spparameterWHERE name IN ('log_archive_start', 'background_dump_dest', 'utl_file_dir')ORDER BY name;3. Migrate Functionality from Deprecated Parameters
Section titled “3. Migrate Functionality from Deprecated Parameters”UTL_FILE_DIR Migration
Section titled “UTL_FILE_DIR Migration”-- Before (deprecated): utl_file_dir = /tmp:/u01/files-- After: Create Oracle Directory objects
-- Create a directory object to replace each path in UTL_FILE_DIRCREATE OR REPLACE DIRECTORY tmp_dir AS '/tmp';CREATE OR REPLACE DIRECTORY files_dir AS '/u01/files';
-- Grant access to application usersGRANT READ, WRITE ON DIRECTORY tmp_dir TO app_user;GRANT READ, WRITE ON DIRECTORY files_dir TO app_user;
-- Remove the deprecated parameterALTER SYSTEM RESET utl_file_dir SCOPE=SPFILE;BACKGROUND_DUMP_DEST / USER_DUMP_DEST Migration
Section titled “BACKGROUND_DUMP_DEST / USER_DUMP_DEST Migration”-- These are replaced by DIAGNOSTIC_DEST (introduced in 11g)-- Set DIAGNOSTIC_DEST to the ADR baseALTER SYSTEM SET diagnostic_dest = '/u01/app/oracle' SCOPE=BOTH;
-- Remove the obsolete parametersALTER SYSTEM RESET background_dump_dest SCOPE=SPFILE;ALTER SYSTEM RESET user_dump_dest SCOPE=SPFILE;ALTER SYSTEM RESET core_dump_dest SCOPE=SPFILE;4. Handle Hidden (Underscore) Parameter Removal Safely
Section titled “4. Handle Hidden (Underscore) Parameter Removal Safely”-- Research each underscore parameter before removing-- Check My Oracle Support for the bug number and whether the patch is applied
-- Example: remove a workaround parameter after confirming the patch is applied-- ALTER SYSTEM RESET "_fix_control" SCOPE=SPFILE;-- ALTER SYSTEM RESET "_optimizer_use_feedback" SCOPE=SPFILE;
-- Always bounce a non-production instance first to confirm stability-- Then apply to production during the next maintenance window5. Validate the Cleaned SPFILE and Restart
Section titled “5. Validate the Cleaned SPFILE and Restart”-- After removing obsolete parameters, create a new PFILE snapshotCREATE PFILE='/tmp/pfile_clean_YYYYMMDD.ora' FROM SPFILE;
-- Review the clean PFILE at OS level to confirm no obsolete parameters remain
-- Bounce the database to apply SPFILE changes and confirm ORA-32004 is gone-- SHUTDOWN IMMEDIATE;-- STARTUP;
-- Verify the alert log no longer contains ORA-32004 after the restartSELECT message_textFROM v$diag_alert_extWHERE originating_timestamp > SYSDATE - 1/24 AND message_text LIKE '%32004%';Prevention Strategies
Section titled “Prevention Strategies”1. Pre-Upgrade Parameter Review
Section titled “1. Pre-Upgrade Parameter Review”-- Before upgrading, run Oracle's pre-upgrade utility which flags obsolete parameters-- $ORACLE_HOME/rdbms/admin/preupgrade.sql (12.1)-- Or use the pre-upgrade jar: java -jar preupgrade.jar TERMINAL TEXT
-- Also query this view on the target version to identify what will be obsoleteSELECT name, isobsolete, isdeprecated, descriptionFROM v$obsolete_parameterWHERE isobsolete = 'TRUE' OR isdeprecated = 'TRUE'ORDER BY name;2. Scheduled Parameter Audit
Section titled “2. Scheduled Parameter Audit”-- Incorporate into a quarterly DBA audit procedureCREATE OR REPLACE PROCEDURE audit_init_parameters ASBEGIN FOR rec IN ( SELECT name, isdeprecated, isobsolete, description FROM v$obsolete_parameter WHERE isspecified = 'TRUE' ORDER BY name ) LOOP DBMS_OUTPUT.PUT_LINE( CASE WHEN rec.isobsolete = 'TRUE' THEN 'OBSOLETE' ELSE 'DEPRECATED' END || ': ' || rec.name || ' -- ' || rec.description ); END LOOP;END;/
EXEC audit_init_parameters;3. SPFILE Version Control
Section titled “3. SPFILE Version Control”-- After any parameter change, export the SPFILE to a versioned PFILE-- and commit it to your configuration management repository
CREATE PFILE='/u01/dba/spfile_exports/pfile_' || TO_CHAR(SYSDATE, 'YYYYMMDD_HH24MI') || '.ora'FROM SPFILE;
-- Automate this with a DBMS_SCHEDULER job after any ALTER SYSTEM SET4. Version-Specific Parameter Change Reference
Section titled “4. Version-Specific Parameter Change Reference”Key parameters to review when upgrading to Oracle 19c or 23ai:
-- Check these specifically when upgrading from 11g/12c to 19c+SELECT sp.name, sp.valueFROM v$spparameter spWHERE sp.isspecified = 'TRUE' AND sp.name IN ( 'utl_file_dir', 'background_dump_dest', 'user_dump_dest', 'core_dump_dest', 'log_archive_start', 'max_enabled_roles', 'os_authent_prefix', 'remote_os_authent', 'sec_case_sensitive_logon', 'optimizer_adaptive_features', 'parallel_server', 'parallel_server_instances' )ORDER BY sp.name;Diagnostic Scripts
Section titled “Diagnostic Scripts”These Oracle Day by Day scripts can help with parameter and configuration management:
- db.sql — Database configuration overview including version and parameters
- health.sql — Database health check including configuration warnings
Related Errors
Section titled “Related Errors”- ORA-00096 - Invalid value for parameter
- ORA-01034 - Oracle not available (startup failures)
- ORA-00845 - MEMORY_TARGET not supported on this system
Emergency Response
Section titled “Emergency Response”Quick Fixes
Section titled “Quick Fixes”-
Identify all obsolete parameters in one query
SELECT name, isdeprecated, isobsoleteFROM v$obsolete_parameterWHERE isspecified = 'TRUE'ORDER BY isobsolete DESC, name; -
Remove a specific obsolete parameter immediately
ALTER SYSTEM RESET parameter_name SCOPE=SPFILE; -
Create a clean PFILE backup before making changes
CREATE PFILE='/tmp/pfile_pre_cleanup.ora' FROM SPFILE;
Post-Resolution Cleanup
Section titled “Post-Resolution Cleanup”-- Confirm no obsolete parameters remain in the SPFILESELECT COUNT(*)FROM v$obsolete_parameterWHERE isspecified = 'TRUE';
-- Restart the database and confirm ORA-32004 no longer appears-- SHUTDOWN IMMEDIATE;-- STARTUP;
-- Verify the alert log is cleanSELECT originating_timestamp, message_textFROM v$diag_alert_extWHERE originating_timestamp > SYSDATE - 30/1440 AND (message_text LIKE '%32004%' OR message_text LIKE '%obsolete%' OR message_text LIKE '%deprecated%')ORDER BY originating_timestamp;
-- Document the cleanup in your change management system-- and update the SPFILE backup in version control