db2查看修改端口号
2015-09-25 08:21
567 查看
db2查看修改端口号
db2安装完成后,tcp/ip连接端口默认为50000,可通过下面的方法确认:
1、使用命令 db2 get dbm cfg
找到"SVCENAME" 查找到TCP/IP 服务名
www.2cto.com
2、到系统配置文件里找到service name 对应的 port number
windows:查看 c:\windows\system32\drivers\etc\services
aix: 查看 /etc/services
如下:
DB2_DB2 60000/tcp
DB2_DB2_1 60001/tcp
DB2_DB2_2 60002/tcp
DB2_DB2_END 60003/tcp
db2c_DB2 50000/tcp
3、使用 netstat -an 命令查找tcp/ip 服务的端口
4、修改端口号
直接修改services文件中当前服务名对应的端口号
如:db2c_DB2 50000/tcp
然后重启数据库即OK db2stop db2start
www.2cto.com
5、另外附上一个关于linux系统下的查找方法(摘抄帖子):
In JDBC configurations for WPA, you have to specify the port that DB2 is listening on. I usually look for /etc/services or try one of 50000/50001 and it usually works. In SUSE Linux, both the solutions did not work and there was another process (Multithreaded
routing toolkit aka mrt) was listening on port 50000.
So how do we find out the DB2 port in a reliable way? Read on...
Step 1: Set the DB2 environment.
$ . ~db2inst1/sqllib/db2profile
Step 2: Find the service name for DB2 instance. It basically involves running "db2 get dbm cfg" command and finding a line containing SVCENAME.
$ svc=`db2 get dbm cfg | grep SVCENAME | cut -d= -f2 | awk '{print $1}'`
Step 3: Find the service name that you got from Step 2 in /etc/services or %SYSTEMROOT%\system32\drivers\etc\services. That is the port DB2 is
listening on. $ grep $svc /etc/services
Hope you find this useful.
db2安装完成后,tcp/ip连接端口默认为50000,可通过下面的方法确认:
1、使用命令 db2 get dbm cfg
找到"SVCENAME" 查找到TCP/IP 服务名
www.2cto.com
2、到系统配置文件里找到service name 对应的 port number
windows:查看 c:\windows\system32\drivers\etc\services
aix: 查看 /etc/services
如下:
DB2_DB2 60000/tcp
DB2_DB2_1 60001/tcp
DB2_DB2_2 60002/tcp
DB2_DB2_END 60003/tcp
db2c_DB2 50000/tcp
3、使用 netstat -an 命令查找tcp/ip 服务的端口
4、修改端口号
直接修改services文件中当前服务名对应的端口号
如:db2c_DB2 50000/tcp
然后重启数据库即OK db2stop db2start
www.2cto.com
5、另外附上一个关于linux系统下的查找方法(摘抄帖子):
In JDBC configurations for WPA, you have to specify the port that DB2 is listening on. I usually look for /etc/services or try one of 50000/50001 and it usually works. In SUSE Linux, both the solutions did not work and there was another process (Multithreaded
routing toolkit aka mrt) was listening on port 50000.
So how do we find out the DB2 port in a reliable way? Read on...
Step 1: Set the DB2 environment.
$ . ~db2inst1/sqllib/db2profile
Step 2: Find the service name for DB2 instance. It basically involves running "db2 get dbm cfg" command and finding a line containing SVCENAME.
$ svc=`db2 get dbm cfg | grep SVCENAME | cut -d= -f2 | awk '{print $1}'`
Step 3: Find the service name that you got from Step 2 in /etc/services or %SYSTEMROOT%\system32\drivers\etc\services. That is the port DB2 is
listening on. $ grep $svc /etc/services
Hope you find this useful.
相关文章推荐
- 进度条--progress
- 求集合并集
- SQL Server链接服务器访问DB2设置步骤图解
- vm虚拟机克隆联网小技巧
- Creating a Linked Server to DB2
- 《人性的优点》摘读 第1章 活在“完全独立的今天”
- 第4周 项目2-建设“单链表”算法库
- 第三周项目3 求集合并集
- Hive 操作数据库语句总结
- 第3周 项目3-求集合并集
- [leetcode-279]Perfect Squares(java)
- easyui 如何使个别onExpandRow的+号隐藏
- 项目5 -- 猴子选大王
- Hive 创建数据库异常
- 面对对象思想4
- Routing Manager for WCF4 z
- 从命令行输入数字相加
- 第3周项目2 建设“顺序表”算法库
- 大数据系列一--引文
- 第三周项目2—建设“顺序表”算法库