Blogs

Oracle init.ora parameters and Delphix VDBs

By Delphix FAQs posted 11-19-2015 05:37:29 PM

  

Templates vs. Individual Settings (GUI and CLI)

Both the CLI and the GUI allow setting parameters at Provisioning time, either through Templates or by individually setting parameters using name value pairs.  

You can only use one or the other.  It is not possible to mix and match Templates and Individual Settings.

However, the method of enforcing this restriction varies between the GUI and the CLI.  

Whereas the CLI will issue an error, the GUI allows you to copy Template settings and add, remove, and modify settings.  

GUI Behavior

In the GUI, VDB parameters are set by clicking the Advanced link in the Target Environment screen during Provisioning. 

  • You can choose a Template and Provision.  In this case, the VDB will have a reference to the Template.
  • You can choose to add parameters as name value pairs.  In this case, the VDB will not reference a Template.
  • You can choose a Template and then add or modify parameters.  In this case, the VDB will not reference a Template!  Rather, the values from the template are copied, just as if you had individually typed them in.  

CLI Behavior

In the CLI, VDB parameters are defined by setting either configTemplate or configParams under the source object.

  • You can choose a Template by setting configTemplate.
  • You can choose to add parameters as name value pairs using configParams.
  • Attempting to do both operations at the same time produces an error that the two are mutually exclusive.  There is no way to duplicate the GUI functionality (copying the Template values) in the CLI, but you can achieve this with a simple program by extracting the values from the template object, located under the database object.

Determining whether or not a VDB is referencing a Template

In the GUI, flip the VDB card and look at the value for Template.  If it says Default, there is no Template reference.

In the CLI, cd source and select your source.  Then get configTemplate.  If it says (unset) there is no Template reference.

Changing a VDB to reference a Template after provisioning

In the GUI, flip the VDB card and modify the value for Template.

In the CLI, cd source and select your source.  Then set configTemplate. 

It is not possible to undo this operation and go back to not using a Template!  

To undo the reference to a Template, as a workaround you can provision a VDB from the VDB to preserve your data while resetting your parameter configuration.

Changing a Template after Provisioning: effect on VDBs

When you change a Template, existing VDBs are never immediately affected.

When you change a Template, any VDB which has a reference to that template will be affected during it's next Refresh or Rewind operation.  The new template settings will take affect.  

Any parameter changes made after provisioning (ex: alter system set open_cursors=new_value), but not made to the Template, will be overridden during Refresh/Rewind.  Therefore, for VDBs referencing a Template, in addition to ALTER SYSTEM, Delphix recommends updating VDB Config Templates with new parameter values if you wish to preserve those values for future Refresh/Rewind operations. 

Changing parameters after Provisioning: effect on VDBs (CLI only)

You can change the database parameters within Delphix after Provisioning, using the CLI.

To make changes, cd source and select your source.   Then set configParams.<name>=<value> and commit.

Like changing a Template after Provisioning, this has no immediate effect on VDBs.

Rather, the change will take effect during the next  Refresh or Rewind operation.  As with a Template, any parameter changes made after provisioning (ex: alter system set open_cursors=new_value) will be overridden.  Therefore, for VDBs which don't reference a Template, in addition to ALTER SYSTEM, Delphix recommends updating configParams with new parameter values if you plan to preserve those values for future Refresh/Rewind operations.

The effect of SnapSync on VDB Parameters (only for non-Template based VDBs)

For a VDB which is not referencing a Template, when Delphix performs SnapSync, parameters will be examined and automatically added to the configParams.  These parameters will be retained through Refresh/Rewind operations.  This can be a valuable shortcut.

Types of Parameters

Delphix divides parameters into three different sets: Inherited, Defaulted, and Restricted.

You can customize Inherited and Defaulted parameters.  You cannot customize Restricted parameters.

Inherited Parameters 

Inherited Parameters take their value from the source database.  Delphix allows for these parameters to be customized to your specific needs either with Templates or through individual settings.  

The vast majority of parameters are Inherited Parameters.  Unless a parameters is Defaulted or Restricted, it is Inherited.

Example Inherited Parameters:

  • sga_target
  • open_cursors

Defaulted Parameters

Defaulted Parameters do not take their default from the source database.  These parameters are usually only applicable for a specific database, and it would be incorrect to copy the values from the source database to the VDB.  

These parameters will be unset, so they will default to the Oracle default values.  However, you can set these values using a VDB Config Template or by using individual settings.   

Example Defaulted Parameters:

  • audit_file_dest
  • diagnostic_dest
  • log_archive_dest_1
  • log_archive_dest_state_1
  • remote_listener

For the complete list of Defaulted Parameters see Customizing Oracle VDB Configuration Settings.

Restricted Parameters

These parameters are restricted for use by the Delphix Engine, and are usually derived from the provisioning wizard or the storage mount point location. Attempting to customize these parameters through the use of a VDB Configuration Template will cause an error when you attempt to update the Template.  Attempting to customize these parameters through individual settings will cause an error during the provisioning process.

Example Restricted Parameters:

  • db_file_name_convert
  • db_name
  • control_files

For the complete list of restricted parameters see Customizing Oracle VDB Configuration Settings.

VDB Provision and init Parameters

When a VDB is provisioned Delphix will use your custom settings from a VDB Config Template or individual settings, except for Restricted parameters.

For any other settings, if the parameter is of type Defaulted, these values will be left unset, and will become the Oracle default.  If the parameter is not Restricted or Defaulted, its value is Inherited from the source database as of the time of the Snapsync card which you use for Provisioning.

If you use a Template, the VDB will retain a reference to the Template.

Note that if you use a Template in the GUI, but you add/remove parameters or modify values, your VDB will not have a reference to the Template.  Rather, the GUI will copy the parameter name value pairs from the Template and treat them as if they were individually set.

By adding an empty parameter (simply click the add button but don't fill in anything), you can have the GUI copy your Template parameters but not have a reference to the template.

This trick allows you to leverage Templates for easy configuration, while keeping your VDBs unaffected by Template changes made after they are Provisioned.

In addition, you can make parameter changes in the CLI which will be retained through Refresh/Rewind operations, without having to modify your Template.


Modifying Parameters for an Active VDB

To modify a parameter after provisioning, use the Oracle command ALTER SYSTEM SET <PARAMETER>=<VALUE> SCOPE=BOTH [SID=<VALUE>].

This will set the value both in memory and in the spfile.

Once set, these parameters will remain through stop and start operations, because they are in the spfile.

However, they will not stay in effect when performing the Delphix operations Refresh and Rewind unless you also modify either the Template or the configParams.  

For VDBs which reference a Template, you modify the Template.  For VDBs which don't reference a Template, you modify configParams with the CLI.

VDB Refresh/Rewind and init Parameters

During Refresh/Rewind operations, Delphix resets the VDB init parameters in the spfile and in memory, to either Template values or the configParams values shown in the CLI. 

If you have made changes only to the VDB, even in the spfile, these changes will be lost.  To preserve your changes, you must take additional action:

  • If your VDB references a Template, change the Template values.  Note that this will affect all VDBs referencing that Template, and new VDBs Provisioned with the Template.
  • If your VDB does not reference a Template, change the configParams in the CLI.   You can shortcut this with ALTER SYSTEM commands, followed by a SnapSync.

0 comments
2 views