oracle 19c创建db_link名称带.com域名问题处理
2023-12-13 03:54:55
一、修改PDB的global_name
SYS@orcl1>sho pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB READ WRITE NO
SYS@orcl1>alter session set container=pdb;
Session altered.
SYS@orcl1>select * from global_name;
GLOBAL_NAME
---------------------------------------------------------------------------------------------------------------------------
PDB.CN.OSC.ORACLE.COM
SYS@orcl1>sho pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 PDB READ WRITE NO
SYS@orcl1>
SYS@orcl1>sho parameter domain
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_domain string cn.osc.oracle.com
SYS@orcl1>
SYS@orcl1>UPDATE GLOBAL_NAME SET GLOBAL_NAME='orcl';
1 row updated.
SYS@orcl1>commit;
Commit complete.
SYS@orcl1>select * from global_name;
GLOBAL_NAME
---------------------------------------------------------------------------------------------------------------------------
orcl
cdb信息确认:
SYS@orcl1>alter session set container=cdb$root;
Session altered.
SYS@orcl1>sho pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB READ WRITE NO
--- there is nothing change for cdb
SYS@orcl1>select * from global_name;
GLOBAL_NAME
---------------------------------------------------------------------------------------------------------------------------
ORCL.CN.OSC.ORACLE.COM
二、重启数据库实例
#grid
srvctl stop database -o immediate -d orcl
srvctl start database -d orcl
测试:
创建dblink后,查询字典表dba_db_links来确认dblink名称是否可以创建为不带域名的。
三、修改domain后重试
如以上未成功可尝试此操作
#首先show parameter domain看参数值,需要设为null
alter system set db_domain='' scope=spfile sid='*';
#重启数据库实例
文章来源:https://blog.csdn.net/weixin_41607523/article/details/134814599
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!