签到成功

知道了

CNDBA社区CNDBA社区

Oracle 18c Sharding GSM 的配置文件gsm.ora

2018-10-11 15:39 3888 0 原创 Oracle 18c
作者: dave

因为之前环境Sharding 出现错误,把整个catalog都delete掉了。 然后重新创建的,创建完之后,发现gdsctl连接时会提示当前连接的GSM:

http://www.cndba.cn/cndba/dave/article/3081
http://www.cndba.cn/cndba/dave/article/3081http://www.cndba.cn/cndba/dave/article/3081http://www.cndba.cn/cndba/dave/article/3081http://www.cndba.cn/cndba/dave/article/3081http://www.cndba.cn/cndba/dave/article/3081

[dave@www.cndba.cn ~]$ gdsctl
GDSCTL: Version 18.0.0.0.0 - Production on Thu Oct 11 15:20:50 CST 2018

Copyright (c) 2011, 2018, Oracle.  All rights reserved.

Welcome to GDSCTL, type "help" for information.

Current GSM is set to SHARDDIRECTOR1
GDSCTL> create shardcatalog -database shardcatalog:1521:shardcatalog -chunks 12 -user sdbadmin/oracle -sdb cust_sdb -region region1,region2 -agent_port 8080 -agent_password oracle
Catalog is created

GDSCTL> connect sdbadmin/oracle
Catalog connection is established
GDSCTL> add gsm -gsm sharddirector -listener 1571 -pwd oracle -catalog shardcatalog:1521:shardcatalog -region region1
GSM-45029: SQL error
ORA-01017: invalid username/password; logon denied

这里报用户名和密码不对,在SQLPLUS里修改一下:http://www.cndba.cn/cndba/dave/article/3081

http://www.cndba.cn/cndba/dave/article/3081

SQL> alter user gsmcatuser identified by oracle;

然后继续操作:

GDSCTL> add gsm -gsm sharddirector -listener 1571 -pwd oracle -catalog shardcatalog:1521:shardcatalog -region region1

GSM successfully added
GDSCTL> 
GDSCTL> config gsm
Name      Region    ENDPOINT                                                    
----      ------    --------                                                    
sharddire region1   (ADDRESS=(HOST=shardcatalog)(PORT=1571)(PROTOCOL=tcp))      
ctor

退出来GDSCTL重新连接,就提示我们有2个GSM实体:

http://www.cndba.cn/cndba/dave/article/3081
http://www.cndba.cn/cndba/dave/article/3081

[dave@www.cndba.cn ~]$ gdsctl
GDSCTL: Version 18.0.0.0.0 - Production on Thu Oct 11 15:25:12 CST 2018

Copyright (c) 2011, 2018, Oracle.  All rights reserved.

Welcome to GDSCTL, type "help" for information.

Warning:  gsm.ora contain several GSM entries: 
 SHARDDIRECTOR, SHARDDIRECTOR1
Current GSM is set to SHARDDIRECTOR
GDSCTL>

这里的信息实际上来自$ORACLE_HOME/network/admin/gsm.ora文件:

[dave@www.cndba.cn ~]$ cat /u01/app/oracle/product/18.3.0/dbhome_1/network/admin/gsm.ora
# gsm.ora Network Configuration File: /u01/app/oracle/product/18.3.0/dbhome_1/network/admin/gsm.ora
# Generated by Oracle configuration tools.

SQLNET.WALLET_OVERRIDE = TRUE

SHARDDIRECTOR =
  (configuration =
    (listener =
      (ADDRESS = (HOST = shardcatalog)(PORT = 1571)(PROTOCOL = tcp))
    )
    (cloud = oradbcloud)
  )

WALLET_LOCATION =
  (SOURCE =
    (METHOD = FILE)
    (METHOD_DATA =
      (DIRECTORY = /u01/app/oracle/product/18.3.0/dbhome_1/network/admin/gsmwallet)
    )
  )

SHARDDIRECTOR1 =
  (configuration =
    (listener =
      (ADDRESS = (HOST = shardcatalog)(PORT = 1571)(PROTOCOL = tcp))
    )
    (cloud = oradbcloud)
  )

删掉一个再连接,就剩一个了:

[dave@www.cndba.cn ~]$ gdsctl
GDSCTL: Version 18.0.0.0.0 - Production on Thu Oct 11 15:35:26 CST 2018

Copyright (c) 2011, 2018, Oracle.  All rights reserved.

Welcome to GDSCTL, type "help" for information.

Current GSM is set to SHARDDIRECTOR
GDSCTL>

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2283
    原创
  • 3
    翻译
  • 579
    转载
  • 196
    评论
  • 访问:8167601次
  • 积分:4428
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ