重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

标题: The Database Link (DB LINK) access in Autonomous Database failed with ORA-27476 [打印本页]

作者: 刘泽宇    时间: 2025-5-18 11:37
标题: The Database Link (DB LINK) access in Autonomous Database failed with ORA-27476
现象:
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






欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2