Re: automating database creation

  • From: Ludovico Caldara <ludovico.caldara@xxxxxxxxx>
  • To: nenad.noveljic@xxxxxxxxxxxx
  • Date: Sun, 16 Aug 2020 14:26:40 +0200

Hi Nenad,
DBCA, other than creating the database, does things it is not requested to
do (e.g. registering the database as single-instance with srvctl if it
detects the Clusterware but the option RAC is not chosen).
A customer of mine was using DBCA in a nicely automated environment (600+
databases) but at every new version DBCA was introducing a new surprise
(and DBUA FWIW, I am a fan of autoupgrade but I dislike DBUA).
Creating a database with your own scripts allows you to have full control
on the options, the pre and post executions, the logging, etc.
What I would do if I have to start again is to have a first script that
automates the creation of new templates from scratch (CREATE DATABASE
{{tpl_name}} ...) and a second one that clones the template: copy of
datafiles + create controlfile + dbid + add tempfiles, nothing complex at
all. In this way you can also integrate the database creation with the
management of your ACFS filesystem, if you want to leverage snapshots.
The same goes for the PDBS, it is not just a matter of "create pluggable
database", there are tons of actions to do to create them properly for your
environment.

Ansible, python or shell (if done properly) are good solutions for that.
Then you can integrate with something like RunDeck (or ORDS/DBMS_SCHEDULER
to stay in the Oracle scope) to add a REST interface for a higher level of
automation/integration with 3rd party tools.

Just my 2 cents.
-- 
Ludovico


Il giorno ven 14 ago 2020 alle ore 15:29 Noveljic Nenad <
nenad.noveljic@xxxxxxxxxxxx> ha scritto:

Thank you, Yogi, for your detailed answer. Also thanks to all others who
responded to my e-mail.



Our current automation seems similar to yours – a home grown program
(Perl, in this case) that creates file systems, listener configuration,
ldap aliases, runs cat*sql, and some environment specific scripts based on
application configurations, registers to OEM, RMAN, etc.. But since for 20c
we have to move from Solaris/non-multi-tenant/ZFS to
Linux/multi-tenant/ACFS, we, effectively, have to build everything from
scratch. In doing so, we’d like to transition from Perl to Python, too.
It’s also a good opportunity to review and improve our current practices.
(Niall, I’m also against completely rebuilding something that works well,
but we’re forced by the circumstances.)



The main dilemma is whether to switch to dbca. We evaluated it 10 years
ago and decided against it. Your answer is crisp and clear. Interestingly,
it’s opposite to what others suggested. We plan to evaluate dbca for
ourselves, but, at the same time, other people’s insights, specially about
the pitfalls, are invaluable. Obviously, if we decide to use dbca, we’d
need to remove unused options, either by deinstalling them or using our own
templates.



Best regards,



Nenad

https://nenadnoveljic.com/blog/about/
<https://urldefense.com/v3/__https:/nenadnoveljic.com/blog/about/__;!!GvC3Dl69FG1X3k3XzQ!KZ-YtPjOpVdKpz3XqsB6VQJHXbGyHr_h57YFQFFviDiZM22g94_c6JpozP7S4lBodw$>



____________________________________________________

Please consider the environment before printing this e-mail.

Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken.


Important Notice
This message is intended only for the individual named. It may contain
confidential or privileged information. If you are not the named addressee
you should in particular not disseminate, distribute, modify or copy this
e-mail. Please notify the sender immediately by e-mail, if you have
received this message by mistake and delete it from your system.
Without prejudice to any contractual agreements between you and us which
shall prevail in any case, we take it as your authorization to correspond
with you by e-mail if you send us messages by e-mail. However, we reserve
the right not to execute orders and instructions transmitted by e-mail at
any time and without further explanation.
E-mail transmission may not be secure or error-free as information could
be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also
processing of incoming e-mails cannot be guaranteed. All liability of
Vontobel Holding Ltd. and any of its affiliates (hereinafter collectively
referred to as "Vontobel Group") for any damages resulting from e-mail use
is excluded. You are advised that urgent and time sensitive messages should
not be sent by e-mail and if verification is required please request a
printed version. Please note that all e-mail communications to and from the
Vontobel Group are subject to electronic storage and review by Vontobel
Group. Unless stated to the contrary and without prejudice to any
contractual agreements between you and Vontobel Group which shall prevail
in any case, e-mail-communication is for informational purposes only and is
not intended as an offer or solicitation for the purchase or sale of any
financial instrument or as an official confirmation of any transaction.
The legal basis for the processing of your personal data is the legitimate
interest to develop a commercial relationship with you, as well as your
consent to forward you commercial communications. You can exercise, at any
time and under the terms established under current regulation, your rights.
If you prefer not to receive any further communications, please contact
your client relationship manager if you are a client of Vontobel Group or
notify the sender. Please note for an exact reference to the affected group
entity the corporate e-mail signature. For further information about data
privacy at Vontobel Group please consult www.vontobel.com.

Other related posts: