Comments (9)
I never tried this , but you can look at these ones dbtemplate dbt for 11g and 12c https://github.com/biemond/biemond-oradb/tree/master/templates and see the differences.
do you have an example of this
from biemond-oradb.
Yes, I can see there are differences in the ones that oracle provides and the ones here. I'm using *.dbc template (Which contains both the structure and the physical datafiles).
https://docs.oracle.com/cd/E24628_01/install.121/e22624/appdx_seed_db_template.htm#EMBSC242
Is there a possibility to include *.dbc extension capability in the database.pp class? Right now, it is hard coded to use only *.dbt.erb only. I've tried renaming my *.dbc to *.dbt format and then actual dbca command fails as there is difference between both the formats.
+++ hard coded in database.pp +++
if ( $template ) {
file { $templatename:
ensure => present,
content => template("${mountPoint}/${template}.dbt.erb"),
mode => '0775',
owner => $user,
group => $group,
before => Exec["oracle database ${title}"],
}
}
++++
from biemond-oradb.
there is a diffence between dbc and dbt
.dbc - Database Clone (for a new database)
.dbt - Template Database (for an existing database)
so without template I use the demo templates such as Data_Warehouse.dbc, General_Purpose.dbc, Transaction_Processing.dbc, and New_Database.dbt
this is really fast but with dbt it creates it from nothing and is basically no clone.
for dbc I probably only need to know the location of dbc (probably all on 1 vm) and its dbca parameters. This shouldn't be that hard.
from biemond-oradb.
Appreciate for your quick response! You are right..!
You may download the Oracle provided preconfigured repository template zip from OTN and extract it to a location accessible :
http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/db-templates-2205022.html
I've tried the dbca manually using the already existing parameters in database.pp for 12.1 DB version and it worked like a charm.
dbca -silent -createDatabase -templateName /opt/oracle/product/12.1.0/dbhome_1/assistants/dbca/templates/12.1.0.2.0_Database_Template_for_EM12_1_0_5_0_Small_deployment.dbc -gdbname XXXX -responseFile NO_VALUE -sysPassword XXXX -systemPassword XXXX -dbsnmpPassword XXXX -asmsnmpPassword XXXX -storageType FS -emConfiguration NONE
++++ Actual command from database.pp ++++
+++++
from biemond-oradb.
oh nice,
that looks easy to add.
👍
from biemond-oradb.
How about allowing to set the $templatename via param, so we can reference a dbc file that we placed.
With dbc you likely also have sql and data files, so a single template is not sufficient. When $templatename is specified then no template is managed...
if ( !$templatename and $template ) {
$templatename = "${download_dir}/${template}_${sanitized_title}.dbt"
file { $templatename:
ensure => present,
content => template("${mountPoint}/${template}.dbt.erb"),
mode => '0775',
owner => $user,
group => $group,
before => Exec["oracle database ${title}"],
}
}
if $action == 'create' {
if ( $templatename ) {
if ( $version == '11.2' or $container_database == false ) {
$command = "${oracle_home}/bin/dbca -silent -createDatabase -templateName ${templatename} -gdbname ${globaldb_name} -responseFile NO_VALUE -sysPassword ${sys_password} -systemPassword ${system_password} -dbsnmpPassword ${db_snmp_password} -asmsnmpPassword ${asm_snmp_password} -storageType ${storage_type} -emConfiguration ${em_configuration}"
} else {
$command = "${oracle_home}/bin/dbca -silent -createDatabase -templateName ${templatename} -gdbname ${globaldb_name} -createAsContainerDatabase ${container_database} -responseFile NO_VALUE -sysPassword ${sys_password} -systemPassword ${system_password} -dbsnmpPassword ${db_snmp_password} -asmsnmpPassword ${asm_snmp_password} -storageType ${storage_type} -emConfiguration ${em_configuration}"
}
} else {
$command = "${oracle_home}/bin/dbca -silent -responseFile ${download_dir}/database_${sanitized_title}.rsp"
}
from biemond-oradb.
@biemond what were your thoughts on adding support for dbc or specifically the em dbc?
from biemond-oradb.
look ok, maybe we should use template_seeded as database.pp param and use $templatename internally which can handle dbt and dbc
Send me a Pull Request so you can have the credits
from biemond-oradb.
Will do
from biemond-oradb.
Related Issues (20)
- Any plans to support 19c database ? HOT 4
- Master branch HOT 1
- Any option to support custom string in listener.ora file ? HOT 1
- Hung on lsinv check by 2 processes simultaneously
- Install OGG on one host twice (2 locations) HOT 2
- using oradb::autostartdatabase for multiple databases per server failing HOT 7
- database 19c creation fails due to Automatic Memory Management option HOT 2
- Update metadata.json dependencies of stdlib and concat HOT 2
- Any plans to support for OEM 13.4 ? HOT 1
- oradb.opatch - OPatchauto and NApply HOT 4
- Any plans to support for RHEL 8? HOT 1
- Legacy facts used for operating system family
- Cut a new release and publish to forge HOT 3
- Run the sql for pdb database HOT 3
- Forge to Deinstall GG - golden gate
- Donate project to Voxpupuli
- How does one create multiple entries in the tnsnames.ora file?
- tnsnames.ora file doesn't identify itself with "Puppet Managed. Do not edit!" or similar HOT 1
- Add tnsnames.ora options
- PROTOCOL = for tnsnames.ora doesn't have a default value HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biemond-oradb.