Skip to main content
Delphix

Using Repository Templates to Control Auxiliary Database SGA Size During VDB Rewind Operations (KBA9102)

 

KBA

KBA# 9102

 

Issue

Virtual Oracle Pluggable Database (VPDB) rewind operations require Delphix to establish an auxiliary container database. This container database is used to perform the rewind of the virtual pluggable database using the snapshot and point in time requested during the initiation of the rewind.  Like any Oracle database, the auxiliary container database requires a parameter set be put in place to control the size of the Oracle Shared Global Area (SGA) memory structure used by the Oracle instance associated with this auxiliary container database. 

During provisions a VDB template linked to a repository template is used to perform the task of customizing the database parameter set.  The repository template in the provision scenario links the source database with the target Oracle Home and VDB template to be used when provisioning VDBs to the specific target host and Oracle Home.

During VPDB rewind operations a second repository template must be configured linking the source database, in this case the VPDB itself, with the Oracle Home from which it runs.  Establishing this link allows Delphix to control the size of the auxiliary container database where the rewind and recovery work is performed prior to unplugging the VPDB from here and plugging it back into the container database from which it is to permanently run.

Prerequisites

  • A virtual pluggable database.
  • A VDB template customizing the SGA size, through setting sga_target and sga_max_size parameters to suit the target environment.

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

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

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

Resolution

Controlling the size of the Oracle SGA used by the auxiliary container database requires the creation of a repository template specifically for this task.

A Virtual database template with a minimum set of parameters must exist. 

This can be created through the Delphix CLI or the Delphix GUI.  It will have the following minimum set of the Oracle database parameters. The creation of this is not covered in this note and can be found in the regular Delphix documentation.

dlpx6012rep database template> select vpdbfs1_rewind_tpl
dlpx6012rep database template 'vpdbfs1_rewind_tpl'> ls
Properties
    type: DatabaseTemplate
    name: vpdbfs1_rewind_tpl
    description: Rewind Auxiliary Parameters Template
    parameters:
        compatible: 19.0.0.0
        enable_pluggable_database: true
        pga_aggregate_limit: 4096M
        pga_aggregate_target: 2048M
        sga_max_size: 2200M
        sga_target: 2200M
    reference: DATABASE_TEMPLATE-3
    sourceType: OracleVirtualSource
    
Creating the repository template.

The repository template will link the following Delphix objects:

  • The repository template name, in this case vpdbfs1_repo_tpl.
  • The container that the rewind operation is to be performed against, in this case the virtual pluggable database, vpdbfs1.
  • The virtual database template, in this case vpdbfsl_rewind_tpl.
  • The repository or Oracle Home of the container database that holds this virtual pluggable database, FSDB1, in this case the Oracle Home with the path '/u01/app/oracle/19.11.1/dbhome_1' running from the environment OEL7SITDE2
dlpx6012rep repository template> create
dlpx6012rep repository template create *> set name=vpdbfs1_repo_tpl

dlpx6012rep repository template create *> set container=vpdbfs1

dlpx6012rep repository template create *> set template=vpdbfs1_rewind_tpl

dlpx6012rep repository template create *> ls
Properties
    type: SourceRepositoryTemplate
    name: vpdbfs1_repo_tpl (*)
    container: vpdbfs1 (*)
    repository: OEL7SITDE2/'/u01/app/oracle/19.11.1/dbhome_1' (*)
    template: vpdbfs1_rewind_tpl (*)

This results in a template  linking the VPDB itself with the target Oracle Home in the Delphix environment from which it is to run.

dlpx6012rep repository template> ls
Objects
NAME              REPOSITORY                                     CONTAINER  TEMPLATE          
...
vpdbfs1_repo_tpl  OEL7SITDE2/'/u01/app/oracle/19.11.1/dbhome_1'  vpdbfs1    vpdbfs1_rewind_tpl
...
Operations
create
Performing the rewind.

When the rewind operation is performed a check of the alert log used by the auxiliary container database established during the rewind process will show it has used the parameters set through the repository template.  Oracle may perform some adjustment of the values seen in the alert log that results from SGA granule sizing employed by Oracle itself but the values should closely resemble those set in the repository template and the associated VDB template.

[oracle@oel7sitde2 rdbms]$ cd cvpdbfs1pcie/Cvpdbfs1PcIE/trace/
[oracle@oel7sitde2 trace]$ egrep sga_ alert_Cvpdbfs1PcIE.log 
  sga_max_size             = 2208M
  sga_target               = 2208M
  sga_max_size             = 2208M
  sga_target               = 2208M

 

Troubleshooting

Not controlling the size of the Oracle SGA used by the auxiliary container database using a repository template can result in Oracle instances created for the auxiliary container database with an SGA sized beyond the memory resource capabilities of the target environment.  This manifests itself as failures in starting the auxiliary instance and rewind failures. The following Oracle error is typically reported by Delphix and Oracle at the time of the failure.

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Apr 6 09:21:03 2022
...
SQL> ORA-27125: unable to create shared memory segment

 

 

 


Related Articles

The following articles may provide more information or related information to this article: