Blogs

Template for temporal container when provisioning pluggable VDB's

By Diego Loureda posted 06-06-2017 07:29:07 PM

  
As you know per Delphix documentation, during vPDB provisioning, the Delphix Engine creates a temporary CDB instance in the target environment to recover the vPDB to a consistent state. This temporary CDB will be automatically deleted after the vPDB is provisioned successfully.

By default we use init file from production/source container to create this temporal container for recovering.

Normally production containers are bigger than dev/test ones, so if for example your production container is running on a 192GB Server and Target is a 32GB commodity hardware machine you may be in trouble and provision may fail.

Provision/refresh can fail because we don't have enough memory on de dev/test server to create a container as big as the Prod one. Or sometimes we just want to have control on the size of the container that we create.

In order to avoid this issue, we can create a template for this "temporal container". Process may be a little complicated so I would like to post here an example to clarify what we need to do.

Let's imagine that we have 2 Production databases called PROD1 and PROD2 and we want to provision Virtual Pluggable Databases VPROD1 and VPROD2 on targets Target1 and Target2. This is what we have to do:

First step is to create a container with minimal values (or the values you want to have based on your target size). Something like this should be enough:





Once we have the template ready, we need to create 4 repository templates on the CLI


Diegos-MBP:~ diego$ ssh delphix_admin@172.16.180.166
Password:
Delphix5160HWv8> repository
Delphix5160HWv8 repository> template
Delphix5160HWv8 repository template> create
Delphix5160HWv8 repository template create *> set name=VPROD1_Target1_Template
Delphix5160HWv8 repository template create *> set container=PROD1
Delphix5160HWv8 repository template create *> set repository=Target1/'/u01/app/oracle/product/12.1.2.0/dbhome_1'
Delphix5160HWv8 repository template create *> set template=Container_Template
Delphix5160HWv8 repository template create *> commit

Delphix5160HWv8 repository template> create
Delphix5160HWv8 repository template create *> set name=VPROD2_Target1_Template
Delphix5160HWv8 repository template create *> set container=PROD2
Delphix5160HWv8 repository template create *> set repository=Target1/'/u01/app/oracle/product/12.1.2.0/dbhome_1'
Delphix5160HWv8 repository template create *> set template=Container_Template
Delphix5160HWv8 repository template create *> commit

Delphix5160HWv8 repository template> create
Delphix5160HWv8 repository template create *> set name=VPROD1_Target2_Template
Delphix5160HWv8 repository template create *> set container=PROD1
Delphix5160HWv8 repository template create *> set repository=Target2/'/u01/app/oracle/product/12.1.2.0/dbhome_1'
Delphix5160HWv8 repository template create *> set template=Container_Template
Delphix5160HWv8 repository template create *> commit

Delphix5160HWv8 repository template> create
Delphix5160HWv8 repository template create *> set name=VPROD2_Target2_Template
Delphix5160HWv8 repository template create *> set container=PROD2
Delphix5160HWv8 repository template create *> set repository=Target2/'/u01/app/oracle/product/12.1.2.0/dbhome_1'
Delphix5160HWv8 repository template create *> set template=Container_Template
Delphix5160HWv8 repository template create *> commit

Delphix5160HWv8 repository template> ls
Objects
NAME                                    REPOSITORY                                                             CONTAINER TEMPLATE
VPROD1_Target1_Template Target1/'/u01/app/oracle/product/12.1.2.0/dbhome_1' PROD1 Container_Template
VPROD2_Target1_Template Target1/'/u01/app/oracle/product/12.1.2.0/dbhome_1' PROD2 Container_Template
VPROD1_Target2_Template Target2/'/u01/app/oracle/product/12.1.2.0/dbhome_1' PROD1 Container_Template
VPROD1_Target2_Template Target2/'/u01/app/oracle/product/12.1.2.0/dbhome_1' PROD2 Container_Template

Operations
create
Delphix5160HWv8 repository template> 

As you can see, the label container on this case means Source PDB (production) and repository should be filled with the target repositories (dev/test). On template, we just need to add the template that we created on step 1, and we will be using the same in all our templates.

So every time we provision any VDB from those 2 dSources, we will be using this minimal templates instead of creating ones with production values that can cause problems.

Hope this helps!
#Virtualization
2 comments
18 views

Comments

06-06-2017 08:27:22 PM

Good catch Gianpiero!! Let me correct that.

Thanks!

06-06-2017 07:41:10 PM

Great post, Diego! Few months ago Marcin helped me with this. But a post in the community is a very good idea to share knowledge with others. In the example you made at the beginning of this post you wrote a target server with 32TB, did you mean 32GB? Best Regards Gianpiero