Hello, everyone
Today, I have a quick tip for you who work with Exadata Cloud at Customer.
And yes, you can do this in the user interface, but in the command line it's much cooler :)
How are you doing?
Today, I have a quick tip for you who work with Exadata Cloud at Customer.
And yes, you can do this in the user interface, but in the command line it's much cooler :)
You can check the references here: Oracle Cloud Infrastructure Documentation. And here: Exadata Database Service on Dedicated Infrastructure
First of all, what is dbaascli?
In a simple definition, it is a command line utility that can be used to interact with your databases in a simple and straightforward way in Exadata Cloud at Customer and Cloud Service environments.
You can perform operations such as patching, creating a database, Upgrading, Backup and Recovery, Status Monitoring, Changing user passwords, and more.
You can perform operations such as patching, creating a database, Upgrading, Backup and Recovery, Status Monitoring, Changing user passwords, and more.
Today, I'll show you how to change the SYS password in Exadata Cloud at Customer and in a DR environment running on Exadata Cloud Service.
So, lets get start!
dbaascli database changePassword --help
DBAAS CLI version 25.1.2.0.0
Executing command database changePassword --help
database changePassword - change the password for a given user in the database.
Usage: dbaascli database changePassword --dbname <value> [--user <value>]
{
[--prepareStandbyBlob <value> [--blobLocation <value>]]
| [--standbyBlobFromPrimary <value>]
}
[--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>]
Where:
--dbname - Oracle database name.
[--user - username whose password change is required. ]
[--prepareStandbyBlob | --standbyBlobFromPrimary]
[--prepareStandbyBlob - specifies true to generate a blob file containing the artifacts needed to perform the operation in a DG environment. ]
[--blobLocation - custom directory location where the standby blob file will be generated in a DG environment.]
[--standbyBlobFromPrimary - specifies the location of the standby blob file which is prepared from the primary database. This is required only for standby operations. ]
[--resume - to resume the previous operation]
[--sessionID - to resume a specific session id.]
[--executePrereqs - run the prerequisite checks and report the results. ]
[--waitForCompletion - specifies false to run the operation in background. Valid values : true|false.]
Executing command database changePassword --help
database changePassword - change the password for a given user in the database.
Usage: dbaascli database changePassword --dbname <value> [--user <value>]
{
[--prepareStandbyBlob <value> [--blobLocation <value>]]
| [--standbyBlobFromPrimary <value>]
}
[--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>]
Where:
--dbname - Oracle database name.
[--user - username whose password change is required. ]
[--prepareStandbyBlob | --standbyBlobFromPrimary]
[--prepareStandbyBlob - specifies true to generate a blob file containing the artifacts needed to perform the operation in a DG environment. ]
[--blobLocation - custom directory location where the standby blob file will be generated in a DG environment.]
[--standbyBlobFromPrimary - specifies the location of the standby blob file which is prepared from the primary database. This is required only for standby operations. ]
[--resume - to resume the previous operation]
[--sessionID - to resume a specific session id.]
[--executePrereqs - run the prerequisite checks and report the results. ]
[--waitForCompletion - specifies false to run the operation in background. Valid values : true|false.]
Now, for we change the SYS password is simple. Using the root user:
dbaascli database changePassword --dbname mdtrj --user SYS --prepareStandbyBlob true --blobLocation /u02/app/oracle/product/12.1.0/dbhome_6/dbs
Log:
DBAAS CLI version 25.1.1.0.0
Executing command database changePassword --dbname mdtrj --user SYS --prepareStandbyBlob true --blobLocation /u02/app/oracle/product/12.1.0/dbhome_6/dbs
Job id: 62a5866c-67d9-4da1-b164-d3dbc877ae0f
Session log: /var/opt/oracle/log/mdtrj/database/changePassword/dbaastools_2025-05-12_04-51-59-PM_255992.log
Executing command database changePassword --dbname mdtrj --user SYS --prepareStandbyBlob true --blobLocation /u02/app/oracle/product/12.1.0/dbhome_6/dbs
Job id: 62a5866c-67d9-4da1-b164-d3dbc877ae0f
Session log: /var/opt/oracle/log/mdtrj/database/changePassword/dbaastools_2025-05-12_04-51-59-PM_255992.log
Enter new password:
Enter new password (reconfirmation):
Enter new password (reconfirmation):
Loading PILOT...
Session ID of the current execution is: 43672
Log file location: /var/opt/oracle/log/mdtrj/database/changePassword/pilot_2025-05-12_04-52-10-PM_259934
-----------------
Running Plugin_initialization job
Enter new Password *************
Completed Plugin_initialization job
-----------------
Running DB_change_password_prechecks job
Completed DB_change_password_prechecks job
-----------------
Running Extract_blob_in_standby job
Skipping. Job is detected as not applicable.
-----------------
Running Copy_blob_contents_in_standby job
Skipping. Job is detected as not applicable.
-----------------
Running Change_password job
Completed Change_password job
-----------------
Running Update_db_wallet job
Completed Update_db_wallet job
-----------------
Running Prepare_blob_for_standby_in_primary job
Completed Prepare_blob_for_standby_in_primary job
---------- PLUGIN NOTES ----------
Note: Change password operation has run on the primary database. In order to successfully complete the operation, the file /u02/app/oracle/product/12.1.0/dbhome_6/dbs/mdtrj_2025-05-12_04-52-10-PM_259934.tar needs to be copied to the standby database node and run the change password operation on all standby databases by specifying the copied file
---------- END OF PLUGIN NOTES ----------
dbaascli execution completed
Session ID of the current execution is: 43672
Log file location: /var/opt/oracle/log/mdtrj/database/changePassword/pilot_2025-05-12_04-52-10-PM_259934
-----------------
Running Plugin_initialization job
Enter new Password *************
Completed Plugin_initialization job
-----------------
Running DB_change_password_prechecks job
Completed DB_change_password_prechecks job
-----------------
Running Extract_blob_in_standby job
Skipping. Job is detected as not applicable.
-----------------
Running Copy_blob_contents_in_standby job
Skipping. Job is detected as not applicable.
-----------------
Running Change_password job
Completed Change_password job
-----------------
Running Update_db_wallet job
Completed Update_db_wallet job
-----------------
Running Prepare_blob_for_standby_in_primary job
Completed Prepare_blob_for_standby_in_primary job
---------- PLUGIN NOTES ----------
Note: Change password operation has run on the primary database. In order to successfully complete the operation, the file /u02/app/oracle/product/12.1.0/dbhome_6/dbs/mdtrj_2025-05-12_04-52-10-PM_259934.tar needs to be copied to the standby database node and run the change password operation on all standby databases by specifying the copied file
---------- END OF PLUGIN NOTES ----------
dbaascli execution completed
Copy the TAR file created in /u02/app/oracle/product/12.1.0/dbhome_6/dbs to DR environment:
And execute on DR:
dbaascli database changePassword --dbName mdtrj --user SYS
--standbyBlobFromPrimary /home/oracle/covek/mdtrj_2025-05-12_04-52-10-PM_259934.tar
Log:
DBAAS CLI version 25.1.2.0.0
Executing command database changePassword --dbName mdtrj --user SYS --standbyBlobFromPrimary /home/oracle/covek/mdtrj_2025-05-12_04-52-10-PM_259934.tar
Job id: 67722d25-f4ff-4bfe-9a80-d20780099caa
Session log: /var/opt/oracle/log/mdtrj/database/changePassword/dbaastools_2025-05-12_05-26-42-PM_390865.log
Executing command database changePassword --dbName mdtrj --user SYS --standbyBlobFromPrimary /home/oracle/covek/mdtrj_2025-05-12_04-52-10-PM_259934.tar
Job id: 67722d25-f4ff-4bfe-9a80-d20780099caa
Session log: /var/opt/oracle/log/mdtrj/database/changePassword/dbaastools_2025-05-12_05-26-42-PM_390865.log
Enter new password:
Enter new password (reconfirmation):
Loading PILOT...
Session ID of the current execution is: 41121
Log file location: /var/opt/oracle/log/mdtrj/database/changePassword/pilot_2025-05-12_05-26-53-PM_395770
-----------------
Running Plugin_initialization job
Enter new password ******
Completed Plugin_initialization job
-----------------
Running DB_change_password_prechecks job
Completed DB_change_password_prechecks job
-----------------
Running Extract_blob_in_standby job
Completed Extract_blob_in_standby job
-----------------
Running Copy_blob_contents_in_standby job
Completed Copy_blob_contents_in_standby job
-----------------
Running Change_password job
Skipping. Job is detected as not applicable.
-----------------
Running Update_db_wallet job
Completed Update_db_wallet job
-----------------
Running Prepare_blob_for_standby_in_primary job
Skipping. Job is detected as not applicable.
dbaascli execution completed
Enter new password (reconfirmation):
Loading PILOT...
Session ID of the current execution is: 41121
Log file location: /var/opt/oracle/log/mdtrj/database/changePassword/pilot_2025-05-12_05-26-53-PM_395770
-----------------
Running Plugin_initialization job
Enter new password ******
Completed Plugin_initialization job
-----------------
Running DB_change_password_prechecks job
Completed DB_change_password_prechecks job
-----------------
Running Extract_blob_in_standby job
Completed Extract_blob_in_standby job
-----------------
Running Copy_blob_contents_in_standby job
Completed Copy_blob_contents_in_standby job
-----------------
Running Change_password job
Skipping. Job is detected as not applicable.
-----------------
Running Update_db_wallet job
Completed Update_db_wallet job
-----------------
Running Prepare_blob_for_standby_in_primary job
Skipping. Job is detected as not applicable.
dbaascli execution completed
And that's it, simple as that.
I hope this helps you.
Regards
Mario