Overview

This resource allows you to manage a service in an Oracle database.

It has support for serices on single instance databases, but also supports creating services on a RAC cluster. Here is an example on setting a service on a RAC cluster.

ora_service { 'MYSERVICE.DEVELOPMENT.ORG@SID1':
  ensure              => 'present',
  aq_ha_notifications => 'false',
  clb_goal            => 'LONG',
  dtp                 => 'false',
  failover_delay      => '0',
  failover_method     => 'NONE',
  failover_retries    => '0',
  failover_type       => 'NONE',
  lb_advisory         => 'THROUGHPUT',
  management_policy   => 'AUTOMATIC',
  preferred_instances => ['O2DEVEL1'],
  server_pool         => ['O2DEVEL_STAM.DEVELOPMENT.ORG'],
  service_role        => 'PRIMARY',
  status              => 'running',
  taf_policy          => 'NONE',
}

On a single instance Oracle database, most of the above options are ignored. So a simple version of the manifest for such a database would be:

ora_service { 'MYSERVICE.DEVELOPMENT.ORG@SID1':
  ensure              => 'present',
}

ora_service doesn’t manage the internal services created by Oracle.

Experience the Power of Puppet for Oracle

If you want to play and experiment with Puppet and Oracle, please take a look at our playgrounds. At our playgrounds, we provide you with a pre-installed environment, where you experiment fast and easy.

Attributes

Attribute Name Short Description
aq_ha_notifications Indicates whether AQ HA notifications should be enabled.
available_instances A list of instance names to activate the service on.
clb_goal The load balancing goal to the service.
commit_outcome Enable Transaction Guard; when set to true, the commit outcome for a transaction is accessible after the transaction’s session fails due to a recoverable outage.
disable_corrective_change Disable the modification of a resource when Puppet decides it is a corrective change.
disable_corrective_ensure Disable the creation or removal of a resource when Puppet decides is a corrective change.
drain_timeout Specify the time, in seconds, allowed for resource draining to be completed.
dtp Distributed Transaction Processing settings for this service.
ensure The basic property that the resource should be in.
failover_delay For Application Continuity and TAF, when reconnecting after a failure, delay between each connection retry (in seconds).
failover_method Failover method for the services.
failover_restore For Application Continuity, when you set the failover_restore property, session states are restored before replaying.
failover_retries The number of failover retry attempts.
failover_type Failover type.
lb_advisory Goal for the Load Balancing Advisory.
management_policy Service management policy.
name  
   
preferred_instances A list of preferred instances on which the service runs when the database is administrator managed.
provider resource.
replay_init_time to start after a successful reconnect.
retention If commit_outcome is set to true, then this parameter determines the amount of time (in seconds) that the commit outcome is retained in the database.
server_pool The name of a server pool used when the database is policy managed.
service_name The service name.
service_role The service role for the specified services.
session_state is changed by the application.
sid SID to connect to.
state the service for maintenance purposes.
status The state of the service.
stopoption Specify the mode in which the service is stopped.
taf_policy Specfies the TAF policy specification (for administrator-managed databases only).

aq_ha_notifications

Indicates whether AQ HA notifications should be enabled.

To enable FAN for OCI connections, set AQ HA Notifications to True. For Oracle Database 12c, FAN uses ONS (Oracle Notification Service).

Here is an exaple on how to use this:

ora_service{'my_service':
  ...
  aq_ha_notifications => false,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are true, false.

Back to overview of ora_service

available_instances

A list of instance names to activate the service on.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  available_instances => ['SID1', 'SID2', 'SID3'],
  ...
}

When an instance is specified that does not or not yet exist in the cluster, Puppet will ignore it.

Back to overview of ora_service

clb_goal

The load balancing goal to the service.

Here is an exaple on how to use this:

ora_service{'my_service':
  ...
  clb_goal => 'SHORT',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are SHORT, LONG, short, long.

Back to overview of ora_service

commit_outcome

Enable Transaction Guard; when set to true, the commit outcome for a transaction is accessible after the transaction’s session fails due to a recoverable outage.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  commit_outcome => false,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are true, false.

Back to overview of ora_service

disable_corrective_change

Disable the modification of a resource when Puppet decides it is a corrective change.

(requires easy_type V2.11.0 or higher)

When using a Puppet Server, Puppet knows about adaptive and corrective changes. A corrective change is when Puppet notices that the resource has changed, but the catalog has not changed. This can occur for example, when a user, by accident or willingly, changed something on the system that Puppet is managing. The normal Puppet process then repairs this and puts the resource back in the state as defined in the catalog. This process is precisely what you want most of the time, but not always. This can sometimes also occur when a hardware or network error occurs. Then Puppet cannot correctly determine the current state of the system and thinks the resource is changed, while in fact, it is not. Letting Puppet recreate remove or change the resource in these cases, is NOT wat you want.

Using the disable_corrective_change parameter, you can disable corrective changes on the current resource.

Here is an example of this:

crucial_resource {'be_carefull':
  ...
  disable_corrective_change => true,
  ...
}

When a corrective ensure does happen on the resource Puppet will not modify the resource and signal an error:

    Error: Corrective change present requested by catalog, but disabled by parameter disable_corrective_change
    Error: /Stage[main]/Main/Crucial_resource[be_carefull]/parameter: change from '10' to '20' failed: Corrective change present requested by catalog, but disabled by parameter disable_corrective_change. (corrective)

Back to overview of ora_service

disable_corrective_ensure

Disable the creation or removal of a resource when Puppet decides is a corrective change.

(requires easy_type V2.11.0 or higher)

When using a Puppet Server, Puppet knows about adaptive and corrective changes. A corrective change is when Puppet notices that the resource has changed, but the catalog has not changed. This can occur for example, when a user, by accident or willingly, changed something on the system that Puppet is managing. The normal Puppet process then repairs this and puts the resource back in the state as defined in the catalog. This process is precisely what you want most of the time, but not always. This can sometimes also occur when a hardware or network error occurs. Then Puppet cannot correctly determine the current state of the system and thinks the resource is changed, while in fact, it is not. Letting Puppet recreate remove or change the resource in these cases, is NOT wat you want.

Using the disable_corrective_ensure parameter, you can disable corrective ensure present or ensure absent actions on the current resource.

Here is an example of this:

crucial_resource {'be_carefull':
  ensure                    => 'present',
  ...
  disable_corrective_ensure => true,
  ...
}

When a corrective ensure does happen on the resource Puppet will not create or remove the resource and signal an error:

    Error: Corrective ensure present requested by catalog, but disabled by parameter disable_corrective_ensure.
    Error: /Stage[main]/Main/Crucial_resource[be_carefull]/ensure: change from 'absent' to 'present' failed: Corrective ensure present requested by catalog, but disabled by parameter disable_corrective_ensure. (corrective)

Back to overview of ora_service

drain_timeout

Specify the time, in seconds, allowed for resource draining to be completed.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  drain_timeout => 300,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

dtp

Distributed Transaction Processing settings for this service.

Here is an exaple on how to use this:

ora_service{'my_service':
  ...
  dtp => false,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are true, false.

Back to overview of ora_service

ensure

The basic property that the resource should be in.

Valid values are present, absent.

Back to overview of ora_service

failover_delay

For Application Continuity and TAF, when reconnecting after a failure, delay between each connection retry (in seconds).

Here is an exaple on how to use this:

ora_service{'my_service':
  ...
  failover_delay => 10,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

failover_method

Failover method for the services.

Here is an exaple on how to use this:

ora_service{'my_service':
  ...
  failover_method => 'BASIC',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are NONE, BASIC, none, basic.

Back to overview of ora_service

failover_restore

For Application Continuity, when you set the failover_restore property, session states are restored before replaying. Use LEVEL1 for ODP.NET and Java with Application Continuity to restore the initial state.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  failover_restore => 'LEVEL1',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are NONE, LEVEL1, AUTO, none, level1, auto.

Back to overview of ora_service

failover_retries

The number of failover retry attempts.

Here is an exaple on how to use this:

ora_service{'my_service':
  ...
  failover_retries => 3,
  ...
}

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

failover_type

Failover type.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  failover_type => 'SESSION',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are NONE, SESSION, SELECT, TRANSACTION, AUTO, none, session, select, transaction, auto.

Back to overview of ora_service

lb_advisory

Goal for the Load Balancing Advisory.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  lb_advisory => 'THROUGHPUT',
  ...
}

Puppet provides no default value. But Oracle might depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are NONE, SERVICE_TIME, THROUGHPUT, none, service_time, throughput.

Back to overview of ora_service

management_policy

Service management policy.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  management_policy => 'AUTOMATIC',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are AUTOMATIC, MANUAL, automatic, manual.

Back to overview of ora_service

name

Back to overview of ora_service

preferred_instances

A list of preferred instances on which the service runs when the database is administrator managed.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  prefered_instances => ['SID1', 'SID2'],
  ...
}

When an instance is specified that does not or not yes exist in the cluster, Puppet will ignore it.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

provider

The specific backend to use for this ora_service resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.Available providers are:

oracle11
Manage Oracle services using srvctl syntax for Oracle 11 provider.
oracle12
Manage Oracle services using srvctl syntax for Oracle 12 provider.

Back to overview of ora_service

replay_init_time

For Application Continuity, this parameter specifies the difference between the time, in seconds, of original execution of the first operation of a request and the time that the replay is ready to start after a successful reconnect. Application Continuity will not replay after the specified amount of time has passed. This parameter is intended to avoid the unintentional execution of a transaction when a system is recovered after a long period. If the failover_type parameter is not set to TRANSACTION, then you cannot use this parameter.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  replay_init_time => 300,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

retention

If commit_outcome is set to true, then this parameter determines the amount of time (in seconds) that the commit outcome is retained in the database.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  retention => 300,
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

server_pool

The name of a server pool used when the database is policy managed.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  server_pool => ['pool1', 'pool2'],
  ...
}

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Back to overview of ora_service

service_name

The service name.

When the Oracle init parameter db_domain is set, the service name MUST be a full qualified name. e.g. a name containing a domain. For example:

ora_service{'mydb.mydomain.com@sid':
  ensure => 'present',
}

If the parameter db_domain is empy, you can use unqualified names. For example:

ora_service{'mydb@sid':
  ensure => 'present',
}

Back to overview of ora_service

service_role

The service role for the specified services.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  service_role => 'PHYSICAL_STANDBY',
  ...
}

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, SNAPSHOT_STANDBY, primary, physical_standby, logical_standby, snapshot_standby.

Back to overview of ora_service

session_state

For Application Continuity, this parameter specifies whether the session state that is not transactional is changed by the application. Oracle recommends a setting of DYNAMIC for most applications. This parameter is considered only if failover_type is set to TRANSACTION for Application Continuity.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  session_state => 'DYNAMIC',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are DYNAMIC, STATIC, AUTO, dynamic, static, auto.

Back to overview of ora_service

sid

SID to connect to.

All types have a name like resource@sid. The sid is optional. If you don’t specify the sid, the type will use the database from the /etc/ora_setting.yaml with the property default set to true. We advise you to either use @sid in all your manifests or leave it empty everywhere.

Back to overview of ora_service

state

When a service is disabled Oracle Clusterware will not automatically start, failover or restart the service for maintenance purposes.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  state => 'DISABLED',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are ENABLED, DISABLED, enabled, disabled.

Back to overview of ora_service

status

The state of the service. It can be either running or stopped. On a primary cluster instance the default is running. This means it will automaticaly start the service. When the instance is a standby instance, and you do not specify an expliciet value, Puppet will leave the state of the instance as it is.

Valid values are running, stopped.

Back to overview of ora_service

stopoption

Specify the mode in which the service is stopped. If you set this property on the service, then this value is used if you do not set the value on the command line.

Here is an example on how to use this:

ora_service{'my_service':
  ...
  stopoption => 'IMMEDIATE',
  ...
}

Puppet provides no default value. But Oracle might, depending on your version.

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are NONE, IMMEDIATE, TRANSACTIONAL, none, immediate, transactional.

Back to overview of ora_service

taf_policy

Specfies the TAF policy specification (for administrator-managed databases only).

Here is an example on how you can use this:

ora_service { 'new_service':
  ...
  taf_policy => 'basic',
  ...
}

This is a cluster only property. On single node database this property will be ignored. If you use it, Puppet will issue a warning.

Valid values are BASIC, NONE, PRECONNECT, basic, none, preconnect.

Back to overview of ora_service