程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> TimesTen修改CacheGroup管理用戶在ORACLE端及TT端密碼【TimesTen運維基礎】

TimesTen修改CacheGroup管理用戶在ORACLE端及TT端密碼【TimesTen運維基礎】

編輯:Oracle教程

密碼管理一直是運維中安全管理的一部分,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=================================================================

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved