Oracle Pluggable Database (PDB) resources protect one or more Oracle PDBs within a Container Database (CDB). When a failover occurs, LifeKeeper opens the protected PDBs in the standby CDB.
Resource Type: database/pdb
Aliases: pdb
Preconditions
- Oracle Database with Multi-tenant architecture (CDB/PDB) must be installed on the server.
- The specified CDB SID must exist and be accessible.
- The PDB names listed in
--oracle-pdb-listmust exist within the CDB.
Subcommands
Oracle Pluggable Database resources are managed by commands of the form:
lkcli resource database/pdb <subcommand> [flags]
| Subcommand | Description | Required Role |
|---|---|---|
create
|
Create a new Oracle PDB resource | admin |
extend
|
Extend to a standby server | admin |
get-property
|
Read a resource property | guest |
set-property
|
Update an editable resource property | admin |
create
lkcli resource database/pdb create \
--oracle-sid=<string> --oracle-pdb-list=<array> [flags]
| Flag | Short | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
--oracle-sid
|
— | string | Yes | — | — | SID of the Container Database (CDB) |
--oracle-pdb-list
|
— | array | Yes | — | — | Comma-separated list of PDB names to protect |
--tag
|
— | string | No | Auto-generated | — | Resource tag name |
--switchback
|
— | enum | No | INTELLIGENT
|
INTELLIGENT, AUTOMATIC
|
Switchback type |
extend
lkcli resource database/pdb extend --primary-sys=<string> --primary-tag=<string> [flags]
| Flag | Short | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
--primary-sys
|
— | string | Yes | — | — | Hostname of the server the existing resource is extended from |
--primary-tag
|
— | string | Yes | — | — | Tag of the existing resource to extend |
--standby-sys
|
— | string | No | Value of --host (defaults to localhost)
|
— | Hostname of the standby server |
--switchback
|
— | enum | No | INTELLIGENT
|
INTELLIGENT, AUTOMATIC
|
Switchback type |
--primary-priority
|
— | int | No | Defaults to the current priority of the --primary-sys server, or 1 if the resource has not yet been extended
|
min: 1, max: 999 | Failover priority for the primary server |
--standby-priority
|
— | int | No | Defaults to an unused value which is computed dynamically based on the priority values currently in-use | min: 1, max: 999 | Failover priority for the standby server |
get-property / set-property
lkcli resource database/pdb get-property --tag=<string> --property=<string>
lkcli resource database/pdb set-property --tag=<string> --property=<string> --value=<string>
| Flag | Short | Type | Required | Description |
|---|---|---|---|---|
--tag
|
-t
|
string | Yes | Resource tag name |
--property
|
-p
|
string | Yes | Property name (see Properties table below) |
--value
|
-v
|
string | Yes (set-property only)
|
New property value |
Properties
| Property | Type | Constraints | Editable | Description |
|---|---|---|---|---|
oracle-cdb
|
string | — | No | The Container Database (CDB) SID that hosts the PDBs |
oracle-pdb-list
|
array | — | Yes | List of Pluggable Database names to protect |
quickcheck-interval
|
int | min: 0, max: 604800 | Yes | Quickcheck interval in seconds (default: 180) |
switchback
|
enum | INTELLIGENT, AUTOMATIC
|
Yes | Switchback type |
Example Usage
# Create an Oracle PDB resource protecting two PDBs within CDB CDBORCL
lkcli resource database/pdb create \
--host=server1 \
--oracle-sid=CDBORCL \
--oracle-pdb-list="SALESPDB,HRPDB" \
--tag=pdb.CDBORCL
# Extend to server2
lkcli resource pdb extend \
--primary-sys=server1 \
--primary-tag=pdb.CDBORCL \
--standby-sys=server2



Post your comment on this topic.