因为之前环境Sharding 出现错误,把整个catalog都delete掉了。 然后重新创建的,创建完之后,发现gdsctl连接时会提示当前连接的GSM:https://www.cndba.cn/dave/article/3081https://www.cndba.cn/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里修改一下:https://www.cndba.cn/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实体:
[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文件:https://www.cndba.cn/dave/article/3081
https://www.cndba.cn/dave/article/3081https://www.cndba.cn/dave/article/3081
[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)
)
删掉一个再连接,就剩一个了:
https://www.cndba.cn/dave/article/3081
https://www.cndba.cn/dave/article/3081https://www.cndba.cn/dave/article/3081https://www.cndba.cn/dave/article/3081
[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>
版权声明:本文为博主原创文章,未经博主允许不得转载。