现象:
The database link access in Autonomous Database failed with below error
SQL> select * from dual@DBLINKECS;
select * from dual@DBLINKECS
*
ERROR at line 1:
ORA-27476: "ADMIN"."DBLINKCRED" does not exist
原因:
The credential DBLINKCRED used by the DBLINKECS is dropped
SQL> select owner,db_link,credential_name,credential_owner from dba_db_links;
OWNER DB_LINK CREDENTIAL_NAME CREDENTIAL_OWNER
-------------------- ------------------------------ -------------------- --------------------------------------------------------------------------------------------------------------------------------
SYS SYS_HUB
ADMIN DBLINKECS DBLINKCRED ADMIN
SQL> select owner,credential_name,enabled from dba_credentials;
OWNER CREDENTIAL_NAME ENABL
-------------------- ------------------------- -----
ADMIN OBJ_STORE_CRED TRUE
ADMIN OCI$RESOURCE_PRINCIPAL TRUE
处理方法:
If there is no credential found in dba_credentials, then create the credential using dbms_cloud.create_credential.
SQL> execute dbms_cloud.create_credential('DBLINKCRED','TCUSER','xxx');
PL/SQL procedure successfully completed.
SQL> select * from dual@DBLINKECS;
D
-
X
|