Overview
Gradual Password Rollover in Oracle allows both the old and new password to remain valid for a temporary period after a password change, helping applications avoid connection failures during credential updates. It is controlled using the profile parameter PASSWORD_ROLLOVER_TIME, which defines the grace period. This feature was first introduced in Oracle 21c and later backported to Oracle 19c starting from Release Update 19.12. In Oracle 19c, it is available only if the database is running 19.12 or higher. It is mainly used for seamless password rotation in application environments.
Key Concept: PASSWORD_ROLLOVER_TIME
The profile parameter PASSWORD_ROLLOVER_TIME defines the duration (in days, fractional values supported) during which both the old and new passwords remain valid after a password change.
During this window, the user account enters the OPEN & IN ROLLOVER state, which is visible in DBA_USERS.ACCOUNT_STATUS.escription
NOTE: PASSWORD_ROLLOVER_TIME accepts fractional values (e.g., 1.5 = 36 hours). Setting it to 0 immediately ends the rollover — the old password is rejected at the next login attempt after reconnection.
Step-by-Step Lab Walkthrough (testuser)
The following steps demonstrate the full lifecycle: profile creation, user setup, password change, rollover observation, and rollover termination.
Create the Rollover Profile
Creates a profile named rollover_profile with a 1-day (24-hour) rollover window.
Create User and Assign Profile
Creates the testuser, grants login privilege, and assigns the rollover-enabled profile.
Optionally Extend Rollover Window
Change the Password (Trigger Rollover)
This is the moment the rollover begins. Oracle records the PASSWORD_CHANGE_DATE and puts the account into OPEN & IN ROLLOVER state.
Verify Rollover State
Confirm Both Passwords Work
Setting PASSWORD_ROLLOVER_TIME to 0 terminates the rollover period immediately. The account status remains OPEN & IN ROLLOVER in DBA_USERS until the next login attempt with the old password fails.
Verify Old Password is Now Rejected
NOTE: The DBA_USERS row may still show OPEN & IN ROLLOVER briefly after setting PASSWORD_ROLLOVER_TIME=0. The status clears on the next successful login with the new password.
Full Command Summary
Important Notes & Gotchas
Privilege
Requirement
Only SYSDBA or a user
with the ALTER PROFILE privilege can modify PASSWORD_ROLLOVER_TIME. Attempting it as a normal user
results in ORA-01031: insufficient privileges.
Status Lag
After Setting to 0
DBA_USERS.ACCOUNT_STATUS
may still display OPEN & IN ROLLOVER
even after setting the rollover to 0. The old password is functionally
rejected, but the status column only refreshes on the next successful login.
Profile
Already Exists
Re-running CREATE PROFILE for
an existing profile raises ORA-02379: profile already
exists. Use ALTER PROFILE to
modify existing profiles.
Fractional
Days
PASSWORD_ROLLOVER_TIME accepts fractional values. For example, 0.5 = 12 hours, 1.5 = 36 hours. Use these to fine-tune the rollover window for your application deployment windows.
DBA_USERS
Reference Columns
SELECT username,
account_status,
PASSWORD_CHANGE_DATE,
profile
FROM dba_users
Production Use Cases
PASSWORD_ROLLOVER_TIME is designed for zero-downtime credential rotation in production environments:
• Application
deployments: Deploy new app version
with new credentials while old connection pools drain gracefully.
• Secrets manager
rotation: HashiCorp Vault or AWS
Secrets Manager can rotate credentials without immediate service impact.
• Multi-node
environments: Rolling restarts of
app servers can complete within the rollover window.
• GoldenGate /
Replication users: Rotate
capture/apply user passwords without halting replication.
Comments
Post a Comment