The previous example was very elementary. In reality, you probably need more options when defining a tablespace. No worries. Puppet supports all of the options sqlplus create tablespace
command also supports. Let's investigate some.
Let's ensure that a second tablespace APP_TS_2
is available and that it will auto-extend. The initial size we need is 5G,
any increments created are 2G
and the maximum size we allow is 10G
. Here is the definition of this tablespace. Let's add this to the node hieradata and re-run Puppet
#
# Application specific stuff
#
ora_profile::database::db_tablespaces::list:
APP_TS_1@DB01:
ensure: present
size: 400M
APP_TS_2@DB01:
ensure: present
autoextend: 'on'
max_size: 200M
next: 100M
size: 200M
And run Puppet:
puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp
We see:
Notice: /Stage[main]/Ora_profile::Database::Db_tablespaces/Ora_tablespace[APP_TS_2@DB01]/ensure: created
Let's add the TMP_TS_1
temporary tablespace. Here is the hiera data you have to add to the of the list of tablespaces.
ora_profile::database::db_tablespaces::list:
...
TMP_TS_1@DB01:
contents: 'temporary'
size: 200M
When we run Puppet, we see:
Notice: /Stage[main]/Ora_profile::Database::Db_tablespaces/Ora_tablespace[TMP_TS_1]/ensure: created
Let's add the UNDO_TS_1
undo tablespace. Here is the hiera data you have to add to the of the list of tablespaces.
ora_profile::database::db_tablespaces::list:
...
UNDO_TS_1@DB01:
contents: 'undo'
size: 200M
When we run Puppet, we see:
Notice: /Stage[main]/Ora_profile::Database::Db_tablespaces/Ora_tablespace[UNDO_TS_1]/ensure: created
See the documentation what kind of table space properties you can manage with Puppet use.