DCS-10045:Validation error encountered: invalid database logon credentials;

DCS-10045:Validation error encountered: invalid database logon credentials;

El otro día tuve el siguiente error al activar el dataguard en OCI

Este error no aclara donde puede estar el problema, así que vamos a mirar el JOB a ver que es lo que nos dice:

[root@~]# dbcli list-jobs | grep Failure | tail -2
d29455a0-f6ad-4a9d-8fd7-8eb4306a23e3     Validate DG Config Creation                                               Sunday, March 10, 2024, 01:46:32 CET Failure

Con el paso anterior obtenemos el identificador del JOB, para mirar tanto el log como el detalle del JOB.

  • Detalle del job: "dbcli describe-job -i <id_job> -l Verbose"

  • Ruta del log: /opt/oracle/dcs/log/jobs/<id_job>.log

[root@~]# dbcli describe-job -i 7fe217d7-a6b4-40aa-b00e-8f8c793e7197 -l Verbose

Job details
----------------------------------------------------------------
                     ID:  7fe217d7-a6b4-40aa-b00e-8f8c793e7197
            Description:  Validate DG Config Creation
                 Status:  Failure
                Created:  March 10, 2024 at 1:49:52 AM CET
               Progress:  0%
                Message:  DCS-10045:Validation error encountered: invalid database logon credentials;
 logon denied.
             Error Code:  DCS-10045
                  Cause:  Parameter validation failed.
                 Action:  Provide the correct parameter values for the operation.

Task Name                                                                Start Time                          End Time                            Status
------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------
task:TaskZLockWrapper_27301                                              March 10, 2024 at 1:49:52 AM CET    March 10, 2024 at 1:49:53 AM CET    Failure
Validate create dataguard config task                                    March 10, 2024 at 1:49:52 AM CET    March 10, 2024 at 1:49:53 AM CET    Failure
Validate create dataguard config task                                    March 10, 2024 at 1:49:52 AM CET    March 10, 2024 at 1:49:53 AM CET    Failure

Y a nivel de log:

 [root@~]# dbcli list-jobs | tail -2
fb0729d5-7563-4dce-b886-c12310543466     Validate DG Config Creation                                                 Sunday, March 10, 2024, 13:37:54 CET Success

[root@~]# tail -5 /opt/oracle/dcs/log/jobs/7fe217d7-a6b4-40aa-b00e-8f8c793e7197.log
[2024-03-10 01:49:53,628] FINE [ReportRecorder_TaskZJsonRpcExt_27421 : JobId=7fe217d7-a6b4-40aa-b00e-8f8c793e7197] com.oracle.dcs.agent.zk.DCSZQueue: Node not yet received for: /nodes/node_1/cmd-out-q with prefix:1017_51478_
[2024-03-10 01:49:53,647] FINE [ReportRecorder_TaskZJsonRpcExt_27421 : JobId=7fe217d7-a6b4-40aa-b00e-8f8c793e7197] com.oracle.dcs.agent.task.TaskZJsonRpc: Got response from node node_1's out-queue with prefix as 1017_51478_
Detail: set task result as DCS-10045:Validation error encountered: invalid database logon credentials;
 logon denied.

Parece ser que tenemos un problema con la wallet, así que vamos a generarla de nuevo.

El primer paso es siempre hacer un backup del fichero de inicio de sesión y después generarlo

[oracle@~]$ mv /opt/oracle/dcs/commonstore/wallets/$ORACLE_UNQNAME/tde/cwallet.sso /opt/oracle/dcs/commonstore/wallets/$ORACLE_UNQNAME/tde/cwallet.sso.old
--- cerramos el inicio de sesión automático
SQL> alter system set wallet close;
-- abrimos la wallet con la pass
SQL> alter system set wallet open identified by "XXXX";
-- restablecemos la clave maestra
SQL> alter system set encryption key identified by "XXXX";
SQL> ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY "XXXX" with backup;
SQL> ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY "XXX" WITH BACKUP CONTAINER=ALL;
-- Nos conectamos a la PDB
SQL> alter session set container=XXXX;
SQL>  ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY "XXXX" with backup;

Relanzamos de nuevo el JOB

[root@~]# dbcli describe-job -i fb0729d5-7563-4dce-b886-c12310543466 -l Verbose
Job details
----------------------------------------------------------------
                     ID:  fb0729d5-7563-4dce-b886-c12310543466
            Description:  Validate DG Config Creation
                 Status:  Success
                Created:  March 10, 2024 at 1:37:54 PM CET
               Progress:  100%
                Message:
             Error Code:
Task Name                                                                Start Time                          End Time                            Status
------------------------------------------------------------------------ ----------------------------------- ----------------------------------- ----------
task:TaskZLockWrapper_28374                                              March 10, 2024 at 1:37:55 PM CET    March 10, 2024 at 1:37:58 PM CET    Success
Validate create dataguard config task                                    March 10, 2024 at 1:37:55 PM CET    March 10, 2024 at 1:37:58 PM CET    Success
Validate create dataguard config task                                    March 10, 2024 at 1:37:55 PM CET    March 10, 2024 at 1:37:58 PM CET    Success

Perfecto, el JOB ha superado el paso de validación. Espero que os sirva.