【Teradata】配置PE和AMP(congfig和reconfig工具、vprocmanager)

时间:2023-03-10 01:31:41
【Teradata】配置PE和AMP(congfig和reconfig工具、vprocmanager)

The Reconfiguration and Configuration utilities are used to define the AMPs and PEs that operate together as a Teradata Database. (Configuration is described in an earlier chapter of this manual.)

1.config工具

(1)启动工具

cnsterm
start config
Started ‘config’ in window .
cnsterm
ctrl + c

(2)添加1个HOST、1个PE和4个AMP

begin config
add host hn = , ht = cop //hostname和hosttype,后续必须添加对应PE
add pe , hn =
add amp , cn = //cluster number
add amp
add amps - , cn =
default cluster
end config
list
stop

【list | list pe | list amp | list cluster | list host 】

2.reconfig工具

Reconfiguration 要求没有用户登录,且系统是静止的。以重启数据库为终止。配置过程中,系统不可用。可以使用online和offline两种方式。

(1)登录工具

cnsterm
start reconfig
Started ‘reconfig’ in window .
cnsterm
ctrl + c

登录工具时,如报如下错误,使用vprocmanager工具将对应AMP状态改为offline

6164 NewReady AMPs which are not in New Configuration need to be DOWN

//登录vprocmanager后使用如下命令:
set /v offline
restart

(2)重新配置

reconfig

status //执行过程中查看状态
stop //reconfig命令执行之前使用,停止reconfig。
abort //online方式且在重分布阶段时,停止reconfig。不支持offline方式的reconfig。

(3)确定reconfig正在执行

pdestate -a  //查看当前状态

PDE state is RUN/STARTED.
DBS state is : RECONFIG is running

3.vprocmanager工具设定vproc状态

(1)启动工具

cnsterm
start vprocmanager
Started ‘vprocmanager’ in window .
cnsterm
ctrl + c

(2)status命令

【status | status dbs | status online | status notonline | status pde | status restart | status sysstate | status ,,, to , to 】

【Teradata】配置PE和AMP(congfig和reconfig工具、vprocmanager)

(3)设置vproc状态

set /v  to  offline 
set /v 1 online

【Teradata】配置PE和AMP(congfig和reconfig工具、vprocmanager)

(4) 重启

RESTART