这是我工作中用到的,供参考..
<<远程授权>>..
1,前置机端检查,添加记录
1.1查看当前用户环境变量信息包含$INFORMIXDIR
$env |grep INFORMIXDIR
1.2查看sqlhosts包含远程实例cbtw_ids信息
$cat $INFORMIXDIR/etc/sqlhosts
cbtw_ids onsoctcp 10.133.51.123 9021
2,远程主机10.133.51.123实例cbtw_ids端检查
2.1检查/etc/hosts包含前置机端IP和主机名
$cat /etc/hosts
10.134.64.2 LN210011Q
2.2检查hosts.equiv包含主机和用户信息
#cat hosts.equiv |grep ccpqry2015 (ccpqry2015用户和前置机用户相同)
LN210011Q ccpqry2015
2.3检查/etc/passwd包含用户信息
#cat /etc/passwd |grep ccpqry2015 (ccpqry2015用户和前置机用户相同)
ccpqry2015:!:XX:1::/home/ccpqry2015:/usr/bin/ksh
2.4授权给ccpqry2015用户
dbaccess ln2100prp3gdb -
grant connect to ccpqry2015;
database ln2100car3gdb -
grant connect to ccpqry2015;
2.5验证授权
select * from sysusers where username=\'ccpqry2015\';
3,远程登录验证
在前置机
dbaccess ln2100prp3gdb@cbtw_ids -
info tables
dbaccess ln2100prp3gdb@cbtw_ids -
info tables
收起