TimesTen修改CacheGroup管理用户在ORACLE端及TT端密码【TimesTen运维基础】

        密码管理一直是运维中安全管理的一部分,CacheGroup管理用户密码的修改虽然不复杂,但是对于生产来说,修改不完善比较容易引发故障。这里介绍一下CacheGroup管理用户密码的修改,便于入门的兄弟学习。
1、在主备节点修改sys.odbc.ini配置文件
$ cd $TT_HOME/info
$ vi sys.odbc.ini
[$DSN]
OracleNetServiceName=ORA11G
OraclePWD=cgpasswd        ##此处即修改后的密码

2、停掉主备节点CacheAgent和Replication
主节点:
$ ttadmin -cachestop $DSN
$ ttadmin -repstop $DSN

ttisql  -connstr <DSN> -v 1 -e "call ttcachestop;bye;"
ttisql  -connstr <DSN> -v 1 -e "call ttcachestop;bye;"

备节点:
$ ttadmin -cachestop $DSN
$ ttadmin -repstop $DSN

ttisql  -connstr <DSN> -v 1 -e "call ttcachestop;bye;"
ttisql  -connstr <DSN> -v 1 -e "call ttcachestop;bye;"

3、在TT库主备节点同步修改Cache Group管理用户密码:

主节点:
ttisql  -connstr <DSN> -v 1 -e "call ttcacheuidpwdset('cgadmin','cgpasswd');bye;"

备节点:
ttisql  -connstr <DSN> -v 1 -e "call ttcacheuidpwdset('cgadmin','cgpasswd');bye;"

4、开启CacheAgent和Replication进程:
主节点:
$ ttadmin -cachestart $DSN
$ ttadmin -repstart $DSN

ttisql  -cachestart <DSN> -v 1 -e "call ttcachestart;bye;"
ttisql  -repstart <DSN> -v 1 -e "call ttcachestart;bye;"

备节点:
$ ttadmin -cachestop $DSN
$ ttadmin -repstop $DSN

ttisql  -connstr <DSN> -v 1 -e "call ttcachestart;bye;"
ttisql  -connstr <DSN> -v 1 -e "call ttrepstart;bye;"

5、再一次在主备节点重启CacheAgent进程:
主节点:
$ ttadmin -cachestart $DSN
$ ttadmin -repstart $DSN

ttisql  -cachestart <DSN> -v 1 -e "call ttcachestart;bye;"
ttisql  -repstart <DSN> -v 1 -e "call ttcachestart;bye;"

备节点:
$ ttadmin -cachestop $DSN
$ ttadmin -repstop $DSN

ttisql  -connstr <DSN> -v 1 -e "call ttcachestart;bye;"
ttisql  -connstr <DSN> -v 1 -e "call ttrepstart;bye;"

6、重启Cache Group成功后,分别在主备节点执行ttstatus命令检查Cache Group和Replication进程运行状态。
$ttstatus

--检查主备复制及Cache Group刷新状态:
ttisql  -connstr <DSN>  -v 1 -e "call ttbookmark;bye;"
ttisql  -connstr <DSN>  -v 1 -e "select 'PERM' type,
           to_char(round(perm_allocated_size/1024)),
           to_char(round(perm_in_use_size/1024)),
           to_char(round(perm_in_use_high_water/1024)),
           to_char(round(perm_in_use_size*100/perm_allocated_size,2))
      from sys.monitor
    union all
    select 'TEMP' type,
           to_char(round(temp_allocated_size/1024)),
           to_char(round(temp_in_use_size/1024)),
           to_char(round(temp_in_use_high_water/1024)),
           to_char(round(temp_in_use_size*100/temp_allocated_size,2))
      from sys.monitor;
    call ttBlockInfo;bye;"

7、修改TT端Cache Group管理用户口令操作标准流程
登陆主节点,修改Cache Group管理用户口令:
主节点:
$ ttisql $DSN
Command> alter user cgadmin identified by "cgpasswd";
User altered.
The command succeeded.

8、在主节点修改成功后,登陆备节点验证口令:
$ttisql "dsn=$DSN;uid=cgadmin;pwd=Szng!123"

Copyright (c) 1996-2011, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.

connect "dsn=cbe;uid=TTCBE;pwd=Szng!123";
Command>
至此,主备密码同步,修改密码成功。
注意事项
9、检查主备同步
通过ttisql  -connstr <DSN> -v 1 -e "call ttbookmark;bye;" 命令检查主备同步情况。
检查tterrors.log日志信息
检查cachegroup刷新状态

=============End=================================================================
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值