Master the Cloud: The All-in-One dbaascli Tool for OCI
If you are managing Oracle Exadata Cloud Service, you
already know that efficiency is the name of the game. Enter dbaascli - the
powerhouse command-line utility designed to handle everything from routine
status checks to complex database migrations.
Instead of juggling multiple scripts or manual SQL commands,
dbaascli offers a unified interface for the entire lifecycle of your database.
Here is your comprehensive guide to mastering the most essential commands.
Essential Database Administration
Before diving into complex operations, you need to master
the basics. These commands allow you to control your database instances
directly from the compute node.
- Start
a database: # dbaascli database start --dbname TESTDB
- Stop
a database: # dbaascli database stop --dbname TESTDB
- Check
status: # dbaascli database status --dbname TESTDB
Seamless Patching and Rollbacks
Patching is often the most stressful part of a DBA's job. dbaascli
simplifies this by automating the application of patches and providing a safety
net.
- Apply
a Patch:
# dbaascli patch db apply
--patchid PATCH_ID --dbnames DBNAME[,DBNAME2,...]
#dbaascli patch db apply --patchid
1918000 --dbnames TESTDB --run_datasql 1
PATCH_ID is the identifier for the patch to apply.
DBNAME is the database name (can be a comma-separated list)
- Rollback
(Switchback): If a patch causes issues, you can quickly revert to the
previous state.
# dbaascli patch db switchback
--dbnames TESTDB
This rolls back the most recent patch on the specified
database.
Cloning Pluggable Databases (PDBs)
Whether you need a fresh environment for testing or a
developer needs a copy of production data, cloning is a breeze.
SOURCEPDB is the source pluggable
database.
NEWPDB is the name of the new,
cloned PDB.
CDBNAME is the container database name.
Supply SYS user password when
prompted for the source PDB.
- Local
Clone (Same CDB):
# dbaascli pdb local_clone
--pdbname SOURCEPDB --target_pdbname NEWPDB --dbname CDBNAME
- Remote
Clone (Across CDBs):
# dbaascli pdb remote_clone
--pdbname SOURCEPDB --source_db SOURCECDB --source_db_scan SOURCEDBSCAN
--dbname DESTCDB
These commands are generally
executed as oracle or root user on the Exadata compute node, and cover core DBA
lifecycle operations in cloud database deployments. In addition to patching,
backup, and cloning, the dbaascli utility offers advanced features like moving
a database from one Oracle Home to another, duplicating an on-premises database
to the cloud, and various home management operations.
Secure Password Management
Manual password updates in a clustered or Data Guard
environment can be a synchronization nightmare. dbaascli ensures consistency
across all nodes.
- Database
User Passwords: Change SYS or SYSTEM passwords securely.
# dbaascli database changepassword --dbname TESTDB
- TDE
Wallet Passwords: Update your keystore and automatically sync the
wallet across all cluster nodes.
# dbaascli tde changepassword --dbname TESTDB
Enter Old keystore password:
Enter New keystore password:
Re-enter New keystore password:
...
Successfully changed the TDE
keystore password
Pro Tip: Always run password changes through dbaascli
rather than SQL*Plus. This ensures the cloud automation layer stays in sync
with your manual changes, preventing "split-brain" configuration
issues.
Duplicate an On-Premises Database
The dbaascli utility provides a powerful way to migrate and
duplicate on-premises Oracle databases directly to Oracle Cloud Infrastructure
(OCI). This is particularly useful for migrating workloads to Exadata Cloud
Service or Cloud@Customer.
The Command Syntax
To duplicate an on-premises database, you execute the
following command as the root user on the Exadata compute node:
# dbaascli database duplicate --source_db
<ezconnect_string> --tde_wallet_path <wallet_path>
Parameter Explanations
- --source_db:
This requires the EZConnect string of your on-premises database.
- Format:
host:port/service_name (e.g., onprem-host:1521/PROD_SVC).
- This
tells the OCI tooling how to reach your source database over the network.
- --tde_wallet_path:
Specifies the local path to the TDE (Transparent Data Encryption)
wallet file (ewallet.p12).
- Because
OCI databases are encrypted by default, you must provide the source
wallet so the utility can handle the migration of encrypted data and
keys.
- --skipPDBs (Optional): In newer versions of dbaascli, you can add this argument to exclude specific Pluggable Databases from the duplication process if you only need a subset of data.
Move Database to Another Oracle Home
This feature lets administrators relocate a database to an
Oracle Home at a new patch or release level - a common step for “out-of-place
patching” or Oracle version upgrades.
Command Example:
# dbaascli database move --dbname DBNAME –ohome /u01/app/oracle/product/19.19.0/dbhome_1
--precheck
Performs a prereq check before move; the database gets moved
to the specified Oracle Home path. Optionally, add --standby if the database is
a standby in Data Guard.
Quick Reference: Useful Home Commands
|
Task |
Command |
|
View Home Info |
dbaascli dbhome info |
|
Create New Home |
dbaascli dbhome create --version [version] |
|
Delete Home |
dbaascli dbhome delete --ohome [path] |
|
Batch Modify Params |
dbaascli database modify --dbname [name] --params
[json_file] |
The dbaascli utility is more than just a helper script; it
is the backbone of Oracle Database Cloud Service administration. By using it
for patching, cloning, and password management, you ensure your environment
remains secure, compliant, and highly available.
Comments
Post a Comment