TimesTen更改CacheGroup管理用户ORACLE结束和TT结束password【TimesTen操作和维修基地】

        password管理一直操作的一部分的安全管理和维护。CacheGroup管理用户password虽然并不复杂变化。然而,这是用于生产,改不好比较easy导致失败。简介点击这里CacheGroup管理用户password的改动。便于入门的兄弟学习。
1、在主备节点改动sys.odbc.ini配置文件
$ cd $TT_HOME/info
$ vi sys.odbc.ini
[$DSN]
OracleNetServiceName=ORA11G
OraclePWD=cgpasswd        ##此处即改动后的password

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管理用户password:

主节点:
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>
至此,主备password同步,改动password成功。


注意事项
9、检查主备同步
通过ttisql  -connstr <DSN> -v 1 -e "call ttbookmark;bye;" 命令检查主备同步情况。


检查tterrors.log日志信息
检查cachegroup刷新状态

=============End=================================================================

版权声明:本文博主原创文章,博客,未经同意不得转载。

posted @ 2015-10-26 16:29  lcchuguo  阅读(351)  评论(0编辑  收藏  举报