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.

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.
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

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, none, level1.

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, none, session, select, transaction.

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, dynamic, static.

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.

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