[26ai] Mandatory Profile
![[26ai] Mandatory Profile](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1769691076448%2F7a11c52a-8784-4409-a20a-817aeeb70a8f.png&w=3840&q=75)
Ingeniero informático, Oracle ACE, DBA y Arquitecto OCI, con más de 15 años de experiencia en plataformas Oracle. Certificado en OCI Certified Architect Professional y OCI Migration and Integration Certified Professional.
Search for a command to run...
![[26ai] Mandatory Profile](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1769691076448%2F7a11c52a-8784-4409-a20a-817aeeb70a8f.png&w=3840&q=75)
Ingeniero informático, Oracle ACE, DBA y Arquitecto OCI, con más de 15 años de experiencia en plataformas Oracle. Certificado en OCI Certified Architect Professional y OCI Migration and Integration Certified Professional.
No comments yet. Be the first to comment.
If you prefer to read in Spanish Spanish version. Today, we’re going to talk about Temporary Tablespace Groups. Even though It’s not a feature in 26ai, we’re going to set it up. First of all, this type of tablespace allows users , when performing ope...
If you prefer to read in Spanish Spanish version. Today, let's talk about the steps to clone a PDB using RMAN Active Duplicate or DDL commands betweent differents CDB$Root. DDL Let's use a script in
![[OCI] Clone PDB](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F4c20418f-c149-484c-a2b7-c30b4cfec47b.png&w=3840&q=75)
If you prefer to read in Spanish Spanish version. Today, let's see a little script in order to see quickly monitor jobs running into Oracle Database Cloud. Below, you can see the output our sh: At t
![[OCI] Check Jobs DBCli](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F4007e787-d6ad-47d9-b238-d69a285383ab.png&w=3840&q=75)
If you prefer to read in Spanish Spanish version. Today, let's talk about the new join syntax available in the last realease 26ai. It was introduced to simplify our joins avoiding common mistakes, wri
![[26ai] JOIN_TO_ME](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F49867547-f920-47a6-b11f-f5db511bcc73.png&w=3840&q=75)
If you prefer to read in Spanish Spanish version. Today, let's create an audit in order to clean up unused package/procedure/function in the database, with the porpuse of reducing the total amount of
![[26ai] Cleanup of Obsolete PL/SQL Objects](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F64ada612-0048-411c-b9df-61b8825af6e7.png&w=3840&q=75)
If you prefer to read in Spanish Spanish version. Today, let's talk about a new Hybrid Read-Only open-mode in 26ai. When we set up this mode, our PDB is read-only mode for local users and read-write f
![[26ai] Hybrid Read-Only Mode PDB](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fuploads%2Fcovers%2F65605419d28f19cc44df7ef1%2F23e8f92e-f89b-4746-930e-98156e3a1ec4.png&w=3840&q=75)
If you prefer to read in Spanish Spanish version.
Today, we’re going to talk about Mandatory Profile.
Even though It’s not a feature in 26ai, it was available in 21c, we’re going to set it up in the latest release.
This type of Profile can be created at the CDB$Root and can be assigned to our PDBs. Another important point is that if we need to upgrade it, we must do it at the CDB$ROOT, not at the PDB level, and using common users, not local users.
Furthermore, the policies defined in the profile will be applied to all users of the PDB.
What parameters can be used? Unlike in the Profile, where we can assign a bunch of parameters for the setup, here we only have two parameters:
password_verify_function: To enforce password complexity using a function assigned to the Mandatory Profile. By default is null.
password_grace_time: to set a grace period for accounts that are not compliant with mandatory password complexity rules. By default is 0.
First of all, let’s define a new function in order to assing password_verify_function.
SQL>
CREATE OR REPLACE FUNCTION VALIDATION_BUSINESS(username varchar2,
password varchar2,
old_password varchar2)
return boolean IS
BEGIN
if not ora_complexity_check(password, chars => 8, digit => 4) then
return(false);
end if;
return(true);
END;
/
Function created.
As we can see, we have defined the VALIDATION_BUSINESS function within CDB$Root in order to validate that the user’s password has at least 8 characters “chars => 8” and 4 digits “digit=>4“.
After that, let’s create the Mandatory Profile using the following parameters:
PASSWORD_VERIFY_FUNCTION To assign the previous function .
PASSWORD_GRACE_TIME To set a 5‑day grace period for user accounts.
SQL>
CREATE MANDATORY PROFILE C##VALIDATION_BUSINESS
LIMIT
PASSWORD_VERIFY_FUNCTION VALIDATION_BUSINESS
PASSWORD_GRACE_TIME 5
CONTAINER = ALL;
Profile created.
As the last step, let’s upgrade the following parameter: MANDATORY_USER_PROFILE.
Here we have several options. On one hand, if we want to apply it to all PDBs, we need to make the change within CDB$ROOT. On the other hand, if we want to apply it to only one PDB, we need to make the change within that specific PDB.
SQL> show parameter MANDATORY_USER_PROFILE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
mandatory_user_profile string
SQL> ALTER SYSTEM SET MANDATORY_USER_PROFILE=C##VALIDATION_BUSINESS;
System altered.
SQL> show parameter MANDATORY_USER_PROFILE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
mandatory_user_profile string C##VALIDATION_BUSINESS
Looking forward to seeing you in the next article :)