天天看點

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;"

備節點:

3、在TT庫主備節點同步修改Cache Group管理使用者密碼:

主節點:

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;"

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

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

5、再一次在主備節點重新開機CacheAgent程序:

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=================================================================

繼續閱讀