Overview

This type allows you to manage an Oracle tablespace. The datafile and num_datafiles properties are mutually exclusive. When specifying multiple datafiles(or num_datfiles > 1) all datafiles will get the same settings for size, autoextend, next and max_size.

It recognises most of the options that CREATE TABLESPACE supports.

ora_tablespace {'my_app_ts@sid':
  ensure                    => present,
  datafile                  => 'my_app_ts.dbf',
  size                      => 5G,
  logging                   => yes,
  autoextend                => on,
  next                      => 100M,
  max_size                  => 20G,
  extent_management         => local,
  segment_space_management  => auto,
  encryption                => 'AES256',
}

Tablespace with multiple datafiles:

ora_tablespace {'my_app_ts@sid':
  ensure                    => present,
  datafile                  => ['my_app_ts01.dbf', 'my_app_ts02.dbf'],
  size                      => 5G,
  logging                   => yes,
  autoextend                => on,
  next                      => 100M,
  max_size                  => 20G,
  extent_management         => local,
  segment_space_management  => auto,
  encryption                => 'AES256',
}

Tablespace with multiple datafiles using Oracle Managed Files:

ora_tablespace {'my_app_ts@sid':
  ensure                    => present,
  num_datafile              => 3,
  size                      => 5G,
  logging                   => yes,
  autoextend                => on,
  next                      => 100M,
  max_size                  => 20G,
  extent_management         => local,
  segment_space_management  => auto,
  encryption                => 'AES256',
}

You can also create an undo tablespace:

ora_tablespace {'my_undots_1@sid':
  ensure                    => present,
  contents                  => 'undo',
}

or a temporary tablespace:

tablespace {'my_temp_ts@sid':
  ensure                    => present,
  datafile                  => 'my_temp_ts.dbf',
  contents                  => 'temporary',
  size                      => 5G,
  autoextend                => on,
  next                      => 100M,
  max_size                  => 20G,
  extent_management         => local,
  segment_space_management  => auto,
}

Attributes

Attribute Name Short Description
autoextend Enable autoextension for the tablespace.
bigfile Specify if you want a bigfile or a smallfile tablespace.
block_size The block size to use for the tablespace.
contents What does the tablespace contain? permanent, temporary of undo data.
datafile The name of the datafile.
encryption to be encrypted and/or with what algorythm.
ensure The basic property that the resource should be in.
extent_management The extent_management property lets you specify how the extents of the tablespace will be managed.
logging Specify the default logging attributes of all tables, indexes, materialized views, materialized view logs, and partitions within the tablespace.
max_size Maximum size for autoextending.
name The tablespace name.
next Size of the next autoextent.
num_datafiles The number of datafiles to use for the tablespace.
provider resource.
segment_space_management The segment_space_management property is relevant only for permanent, locally managed tablespaces.
sid SID to connect to.
size The size of the tablespace.
tablespace_name The tablespace name.
timeout Timeout for applying a resource in seconds.

autoextend

Enable autoextension for the tablespace.

Valid values are on (also called yes, true), off (also called no, false).

Back to overview of ora_tablespace

bigfile

Specify if you want a bigfile or a smallfile tablespace.

Valid values are yes, no.

Back to overview of ora_tablespace

block_size

The block size to use for the tablespace.

Back to overview of ora_tablespace

contents

What does the tablespace contain? permanent, temporary of undo data.

Valid values are permanent, temporary, undo.

Back to overview of ora_tablespace

datafile

The name of the datafile. This property can be either specified as String or as Array when using multiple datafiles. When using Oracle Managed Files omit this property and use num_datafiles instead.

Back to overview of ora_tablespace

encryption

With this parameter you can specify if the tablespace needs to be encrypted and/or with what algorythm. When specifying a vlue of true, the default encryption algorithm of the database will be used.

ora_tablespace {‘my_app_ts@sid’: … encryption => ‘true|AES128|AES256|3DES168’, … }

Valid values are AES128, AES256, 3DES168, true.

Back to overview of ora_tablespace

ensure

The basic property that the resource should be in.

Valid values are present, absent.

Back to overview of ora_tablespace

extent_management

The extent_management property lets you specify how the extents of the tablespace will be managed.

Valid values are local, dictionary.

Back to overview of ora_tablespace

logging

Specify the default logging attributes of all tables, indexes, materialized views, materialized view logs, and partitions within the tablespace.

Valid values are yes, no.

Back to overview of ora_tablespace

max_size

Maximum size for autoextending.

Back to overview of ora_tablespace

name

The tablespace name.

Back to overview of ora_tablespace

next

Size of the next autoextent.

Back to overview of ora_tablespace

num_datafiles

The number of datafiles to use for the tablespace. Specify this, instead of the datafile property, when using Oracle Managed Files.

Back to overview of ora_tablespace

provider

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

simple
Manage an Oracle Tablespace in an Oracle Database via regular SQL

Back to overview of ora_tablespace

segment_space_management

The segment_space_management property is relevant only for permanent, locally managed tablespaces. It lets you specify whether Oracle Database should track the used and free space in the segments in the tablespace using free lists or bitmaps. This property is not valid for a temporary tablespace.

Valid values are auto, manual.

Back to overview of ora_tablespace

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_tablespace

size

The size of the tablespace.

Back to overview of ora_tablespace

tablespace_name

The tablespace name.

Back to overview of ora_tablespace

timeout

Timeout for applying a resource in seconds.

To be sure no Puppet operation, hangs a Puppet run, all operations have a timeout. When this timeout expires, Puppet will abort the current operation and signal an error in the Puppet run.

With this parameter, you can specify the length of the timeout. The value is specified in seconds. In this example, the timeout is set to 600 seconds.

ora_type{ ...:
  ...
  timeout => 600,
}

The default value for timeout is 300 seconds.

Back to overview of ora_tablespace