您的位置:首页 > 数据库 > Oracle

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

2014-06-05 22:13 609 查看
        密码管理一直是运维中安全管理的一部分,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> -
adc8
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=================================================================
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息