Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
oracle_multitenant_application_container [2021/11/14 18:08] – andonovj | oracle_multitenant_application_container [2021/11/14 20:45] (current) – [Create & Set the container MAP] andonovj | ||
---|---|---|---|
Line 493: | Line 493: | ||
SQL> create pluggable database appcdb as application container admin user pdbadmin identified by Pass123; | SQL> create pluggable database appcdb as application container admin user pdbadmin identified by Pass123; | ||
Pluggable database created. | Pluggable database created. | ||
- | SQL> alter pluggable database | + | SQL> alter pluggable database |
Pluggable database altered. | Pluggable database altered. | ||
Line 527: | Line 527: | ||
SQL> CREATE TABLE c## | SQL> CREATE TABLE c## | ||
country VARCHAR2(30) NOT NULL) | country VARCHAR2(30) NOT NULL) | ||
- | PARTITION BY LIST (region) ( | + | PARTITION BY LIST (country) ( |
PARTITION north VALUES (' | PARTITION north VALUES (' | ||
PARTITION central VALUES (' | PARTITION central VALUES (' | ||
Line 579: | Line 579: | ||
< | < | ||
- | SQL> alter session set container=appcdb; | + | SQL> alter session set container=north; |
Session altered. | Session altered. | ||
SQL> insert into c## | SQL> insert into c## | ||
SQL> insert into c## | SQL> insert into c## | ||
+ | SQL> commit; | ||
+ | SQL> alter session set container=central; | ||
+ | Session altered. | ||
+ | SQL> commit; | ||
SQL> insert into c## | SQL> insert into c## | ||
SQL> insert into c## | SQL> insert into c## | ||
+ | SQL> alter session set container=south; | ||
+ | Session altered. | ||
+ | SQL> commit; | ||
SQL> insert into c## | SQL> insert into c## | ||
SQL> insert into c## | SQL> insert into c## | ||
SQL> commit; | SQL> commit; | ||
- | SQL> ALTER PLUGGABLE DATABASE APPLICATION Application_JULIEN ALL SYNC; | ||
</ | </ | ||
+ | After that you can end the upgrade or installation and sync every application PDB | ||
Now, when you select from that table, the query will be redirect to all PDBs and thus the data will be sharded across the PDBs. If the PDBs are proxy PDBs, it can be even distributed in different continents. | Now, when you select from that table, the query will be redirect to all PDBs and thus the data will be sharded across the PDBs. If the PDBs are proxy PDBs, it can be even distributed in different continents. | ||
Line 596: | Line 603: | ||
===== Cloning ===== | ===== Cloning ===== | ||
- | Clone a non-application PDB in application Container. | + | In this part we will perform the following operations: |
+ | |||
+ | * Clone a remote | ||
+ | * Clone application container | ||
+ | |||
+ | |||
+ | ==== Cloning a remote non-app PDB to application root ==== | ||
The procedure is the same as cloning a PDB, but after we create it, the PDB will be in restricted mode: | The procedure is the same as cloning a PDB, but after we create it, the PDB will be in restricted mode: | ||
Line 647: | Line 660: | ||
SQL> | SQL> | ||
- | </ | + | </ |
+ | |||
+ | Also this procedure can be done with a local PDB. | ||
+ | |||
+ | ===== Conversions ===== | ||
+ | Last but not least, in this part we will: | ||
+ | |||
+ | * Convert normal PDB into application root container | ||
+ | * Convert regular PDB into application PDB | ||
+ | * Relocating a PDB |