Skip to main content
Delphix

Oracle VDB Provision/Refresh fails with ORA-00059: maximum number of DB_FILES exceeded (KBA9372)

 

 

KBA

KBA# 9372

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0, 6.0.13.1, 6.0.14.0, 6.0.15.0

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0

Troubleshooting Oracle VDB Provision/Refresh fails with ORA-00059: maximum number of DB_FILES exceeded

When refreshing or provisioning a VDB, the job fails with the following error:

event_id               | 350106
job                    | JOB-43725
event_time             | 2022-03-02 03:34:48.994
job_state              | FAILED
percent_complete       | 61
message_code           | exception.oracle.targetscripts.controlfile.create
message_details        | Failed to recreate control file.
message_action         | Review the Oracle alert log for more details.
message_command_output | command: umask 027; . $DB_SCRIPT_DIR/setup-oraenv.sh; $DLPX_SHELL $DB_SCRIPT_DIR/doCreateControlFile.sh "$LOGON_STR" $DB_SCRIPT_DIR "/delphix/toolkit/fphvd1"      
                       | output:END_OF_SETUP  
                       | SYS_GUID=BC8645E5EAEE2BA8E053E621D10AC2A2 
                       |  
                       | SQL*Plus: Release 12.2.0.1.0 Production on Mon Mar 1 22:24:32 2021 
                       |  
                       | Copyright (c) 1982, 2016, Oracle.  All rights reserved. 
                       | 
                       |   
                       | Connected to: 
                       | Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 
                       |  
                       | SQL> ORACLE instance shut down.   
                       | SQL> ORACLE instance started.  
                       |
                       | Total System Global Area 5368709120 bytes 
                       | Fixed Size                  8632016 bytes 
                       | Variable Size            1241516336 bytes
                       | Database Buffers         4110417920 bytes 
                       | Redo Buffers                8142848 bytes 
                       | SQL>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50
                          ........
                          651  652  653  654  CREATE CONTROLFILE REUSE SET DATABASE '<DATABASE>' RESETLOGS ARCHIVELOG
                       | * 
                       | ERROR at line 1: 
                       | ORA-01503: CREATE CONTROLFILE failed    
                       | ORA-01210: data file header is media corrupt 
                       | ORA-01110: data file :  
                       | '/delphix/toolkit/fphvd1/datafile/+######/######/DATAFILE/###_###.####.##########'  
                       | ORA-00059: maximum number of DB_FILES exceeded  
                       | ORA-01110: data file 601:  
                       | '/delphix/toolkit/fphvd1/datafile/+######/######/DATAFILE/###_###.####.##########' 
                       | 
                       | 
                       | SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production  
                       | STARTED 
                       | CREATE_CONTROL_FILE_ERROR   
                       | 
event_type             | ERROR

In the above error you can see the error:

ORA-00059: maximum number of DB_FILES exceeded  

 

Resolution

To resolve VDB provision /refresh failing with :

ORA-00059: maximum number of DB_FILES exceeded  

Check if the VDB is using a VDB config template and if so is the number of db_files set therein, for example:

  1. Login to the GUI as an admin user.
  2. Navigate to Manage > Datasets.
  3. Select the VDB.
  4. Navigate to the Configuration tab and check for the name of the VDB config template, for example: 

clipboard_eadc6deba0e1a2082db0e100f83f9cecc.png

From the above, the VDB config template is ora_tempfile

  1. On the source database, run the following SQL statements:
1] Determine the value of db_files
SQL> show parameter db_files


2] Check the number of Datafiles
SQL> select count(*) from dba_data_files;

This should return output similar too :

SQL> show parameter db_files
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_files                             integer     2500
 
SQL> select count(1) from dba_data_files;
 
  COUNT(1)
----------
       641

In the above example, you can see the need to have db_files set to a minimum of 641. However, consider increasing this for growth, setting it for 700 or 750.

  1. Go to Manage > VDB Config Templates
  2. Select the template listed in the Configuration tab, for example, ora_tempfile.
  3. Click the pencil Icon to edit the Parameters.
  4. Change the db_files parameter to a value higher than what was retrieved in the above SQL, for example, 750, and then click Save.

clipboard_e81ce33fa1cbdce8f1feea9ed17bf3f66.png

  1. Retry the VDB Provision or Refresh action.

Alternatively, you can use the CLI to change the value.

  1. Login to the CLI as an admin user
  2. Navigate to Source and then the VDB in question and list the information:
DE > source
DE source> select oratest
DE source 'oratest'> ls
Properties
    type: OracleVirtualSource
    name: oratest
    allowAutoVDBRestartOnHostReboot: false
    archivelogMode: true
    config: oratest
    configParams:
        compatible: '19.0.0'
        db_files: 600
        log_archive_format: '%t_%s_%r.dbf'
        memory_max_target: 1073741824
        memory_target: 1073741824
        nls_language: 'AMERICAN'
        nls_territory: 'AMERICA'
        open_cursors: 300
        processes: 300
        remote_login_passwordfile: 'EXCLUSIVE'
    configTemplate: ora_template
    .......
    .......

In the above example, you can see the required VDB Config Template being used:

ora_template
  1. Go to database, template & edit the required template :
DE > database
DE database> template 
De database template> select <config Template from above output> eg. ora_template 
DE database template 'ora_template'> update
DE database template 'ora_template' update *> set parameters.db_files=750
DE database template 'ora_template' update *> commit
DE database template 'ora_template'> ls
Properties
    type: DatabaseTemplate
    name: ora_template
    description: (unset)
    parameters:
        compatible: '19.0.0'
        db_files: 750
        log_archive_format: '%t_%s_%r.dbf'
        memory_max_target: 1073741824
        memory_target: 1073741824
        nls_language: 'AMERICAN'
        nls_territory: 'AMERICA'
        open_cursors: 300
        processes: 300
        remote_login_passwordfile: 'EXCLUSIVE'
    reference: DATABASE_TEMPLATE-4
    sourceType: OracleVirtualSource

  1. Again after changing you can retry the vDB Provision/ Refresh.