Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / December 2006

Tip: Looking for answers? Try searching our database.

CONNECT TO DB2 VIA TCP/IP PROBLEM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mikael Arhelger - 20 Dec 2006 09:10 GMT
Hello,

This has been posted a few times but still I could not find a way to
connect to our database.  We run DB2 Express on WIN2K server with XP
clients.  I can ping inside network and to the Internet from the
server, so TCP/IP is ok.  The DB2COMM=TCPIP is set also.

Have been scratching my head for days now.

Here some additional data (we are running SAP Business One):

Database Manager Configuration

    Node type = Database Server with local and remote clients

Database manager configuration release level            = 0x0a00
Maximum total of files open               (MAXTOTFILOP) = 16000
CPU speed (millisec/instruction)             (CPUSPEED) =
6.101113e-007
Max number of concurrently active databases     (NUMDB) = 6
Data Links support                          (DATALINKS) = NO
Federated Database System Support           (FEDERATED) = NO
Transaction processor monitor name        (TP_MON_NAME) =
Default charge-back account           (DFT_ACCOUNT_STR) =
Java Development Kit installation path       (JDK_PATH) = E:\Program
Files\IBM\SQLLIB\java\jdk
Diagnostic error capture level              (DIAGLEVEL) = 3
Notify Level                              (NOTIFYLEVEL) = 2
Diagnostic data directory path               (DIAGPATH) =
Default database monitor switches
  Buffer pool                         (DFT_MON_BUFPOOL) = OFF
  Lock                                   (DFT_MON_LOCK) = OFF
  Sort                                   (DFT_MON_SORT) = OFF
  Statement                              (DFT_MON_STMT) = OFF
  Table                                 (DFT_MON_TABLE) = OFF
  Timestamp                         (DFT_MON_TIMESTAMP) = ON
  Unit of work                            (DFT_MON_UOW) = OFF
Monitor health of instance and databases   (HEALTH_MON) = ON
SYSADM group name                        (SYSADM_GROUP) =
SYSCTRL group name                      (SYSCTRL_GROUP) =
SYSMAINT group name                    (SYSMAINT_GROUP) =
SYSMON group name                        (SYSMON_GROUP) =
Client Userid-Password Plugin          (CLNT_PW_PLUGIN) =
Client Kerberos Plugin                (CLNT_KRB_PLUGIN) =
Group Plugin                             (GROUP_PLUGIN) =
GSS Plugin for Local Authorization    (LOCAL_GSSPLUGIN) =
Server Plugin Mode                    (SRV_PLUGIN_MODE) = UNFENCED
Server List of GSS Plugins      (SRVCON_GSSPLUGIN_LIST) =
Server Userid-Password Plugin        (SRVCON_PW_PLUGIN) =
Server Connection Authentication          (SRVCON_AUTH) =
NOT_SPECIFIED
Database manager authentication        (AUTHENTICATION) = SERVER
Cataloging allowed without authority   (CATALOG_NOAUTH) = NO
Trust all clients                      (TRUST_ALLCLNTS) = YES
Trusted client authentication          (TRUST_CLNTAUTH) = CLIENT
Bypass federated authentication            (FED_NOAUTH) = NO
Default database path                       (DFTDBPATH) = E:
Database monitor heap size (4KB)          (MON_HEAP_SZ) = 90
Java Virtual Machine heap size (4KB)     (JAVA_HEAP_SZ) = 256
Audit buffer size (4KB)                  (AUDIT_BUF_SZ) = 0
Size of instance shared memory (4KB)  (INSTANCE_MEMORY) = AUTOMATIC
Backup buffer default size (4KB)            (BACKBUFSZ) = 1024
Restore buffer default size (4KB)           (RESTBUFSZ) = 1024
Agent stack size                       (AGENT_STACK_SZ) = 16
Minimum committed private memory (4KB)   (MIN_PRIV_MEM) = 32
Private memory threshold (4KB)        (PRIV_MEM_THRESH) = 20000
Sort heap threshold (4KB)                  (SHEAPTHRES) = 10000
Directory cache support                     (DIR_CACHE) = YES
Application support layer heap size (4KB)   (ASLHEAPSZ) = 15
Max requester I/O block size (bytes)         (RQRIOBLK) = 32767
DOS requester I/O block size (bytes)     (DOS_RQRIOBLK) = 4096
Query heap size (4KB)                   (QUERY_HEAP_SZ) = 1000
Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10
Priority of agents                           (AGENTPRI) = SYSTEM
Max number of existing agents               (MAXAGENTS) = 400
Agent pool size                        (NUM_POOLAGENTS) =
200(calculated)
Initial number of agents in pool       (NUM_INITAGENTS) = 0
Max number of coordinating agents     (MAX_COORDAGENTS) = MAXAGENTS
Max no. of concurrent coordinating agents  (MAXCAGENTS) =
MAX_COORDAGENTS
Max number of client connections      (MAX_CONNECTIONS) = 6000
Keep fenced process                        (KEEPFENCED) = YES
Number of pooled fenced processes         (FENCED_POOL) =
MAX_COORDAGENTS
Initial number of fenced processes     (NUM_INITFENCED) = 0
Index re-creation time and redo index build  (INDEXREC) = RESTART
Transaction manager database name         (TM_DATABASE) = 1ST_CONN
Transaction resync interval (sec)     (RESYNC_INTERVAL) = 180
SPM name                                     (SPM_NAME) = SAFE01
SPM log size                          (SPM_LOG_FILE_SZ) = 128
SPM resync agent limit                 (SPM_MAX_RESYNC) = 20
SPM log path                             (SPM_LOG_PATH) =
NetBIOS Workstation name                        (NNAME) =
TCP/IP Service name                          (SVCENAME) = db2c_DB2
Discovery mode                               (DISCOVER) = SEARCH
Discover server instance                (DISCOVER_INST) = ENABLE
Maximum query degree of parallelism   (MAX_QUERYDEGREE) = ANY
Enable intra-partition parallelism     (INTRA_PARALLEL) = NO
No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = 1024

Number of FCM request blocks              (FCM_NUM_RQB) = AUTOMATIC

Number of FCM connection entries      (FCM_NUM_CONNECT) = AUTOMATIC

Number of FCM message anchors         (FCM_NUM_ANCHORS) = AUTOMATIC
Knokmans - 20 Dec 2006 11:45 GMT
on your db2 server, be sure the SVCENAME mentioned in the dbm cfg is in the
services file. Like this:
db2c_DB2    50000/tcp
in W2K this file is c:\winnt\system32\drivers\etc\services
50000 is a socket numer i choose for example (but db2 default)
restart the db2 instance

then on you client catalog the node and db
db2 catalog tcpip node <MYNODE> remote <server-ip> server 50000
db2 catalog db <DB> at node <MYNODE>
db2 terminate
db2 connect to <DB> user <user> using <password>

Knokmans

p.s.
You mentioned "ping" is working, but that doens't imply that all TCP sockets
are "open"
maybe there is some firewall issue somewhere on yout net. This CAN also be
you server or client....

> Hello,
>
[quoted text clipped - 102 lines]
>
> Number of FCM message anchors         (FCM_NUM_ANCHORS) = AUTOMATIC
Mikael Arhelger - 20 Dec 2006 16:38 GMT
Hello!

Tks for this quick reply and help.  Still have problem:

db2 catalog db SBO_DB at node NDED8814
SQL1005N  The database alias "SBO_DB" already exists in either the
local database directory or system database directory

db2 terminate
DB20000I  The TERMINATE command completed successfully.

db2 connect to SBO_DB user db2admin using SECRET

... hang ...

Mikael

> on your db2 server, be sure the SVCENAME mentioned in the dbm cfg is in the
> services file. Like this:
[quoted text clipped - 123 lines]
>
> > Number of FCM message anchors         (FCM_NUM_ANCHORS) = AUTOMATIC
Lennart - 20 Dec 2006 15:41 GMT
> Hello,
>
[quoted text clipped - 102 lines]
>
>  Number of FCM message anchors         (FCM_NUM_ANCHORS) = AUTOMATIC

Try telnet from the client to the server on the port that db2 is
listening to. Aka, if db2 is listening on 50000:

#> telnet <server> 50000

/Lennart
Mikael Arhelger - 20 Dec 2006 16:51 GMT
Hello,

The last entry in 'services' shows (on WinXP ws and WIN2K server):

db2c_DB2       50000/tcp

but when I do netstat -a on the WIN2K server, the port 50000 is nowhere
listed although 'db2c_DB2' is.  So, I think ok.

BUT:  when I telnet 192.168.0.1 50000  it hangs.

Q: Am I heading the correct direction now to see the light in the
tunnel?

Mikael

> > Hello,
>
[quoted text clipped - 107 lines]
>
> /Lennart
Gert van der Kooij - 20 Dec 2006 17:03 GMT
> Hello,
>
[quoted text clipped - 9 lines]
> Q: Am I heading the correct direction now to see the light in the
> tunnel?

Do you have a firewall runnning in your network and/or on the W2K
server?
Mikael Arhelger - 20 Dec 2006 18:02 GMT
Hello,

We do have a firewall running on 192.168.0.3 but not on W2K server
192.168.0.1

...

Mikael

> In article <1166633497.140576.176...@80g2000cwy.googlegroups.com>,
> mikaelarhel...@gmail.com says...
[quoted text clipped - 13 lines]
> > tunnel?Do you have a firewall runnning in your network and/or on the W2K
> server?
Gert van der Kooij - 20 Dec 2006 18:07 GMT
> > In article <1166633497.140576.176...@80g2000cwy.googlegroups.com>,
> > mikaelarhel...@gmail.com says...
[quoted text clipped - 20 lines]
>
> ...

Is this firewall filtering all the network traffic? Then maybe it has to
be adjusted to let pass all traffic on port 50000 between the XP clients
and the W2K server.
Mikael Arhelger - 20 Dec 2006 18:32 GMT
Hello,

We will look into it.  Tks!

Mikael

> > > In article <1166633497.140576.176...@80g2000cwy.googlegroups.com>,
> > > mikaelarhel...@gmail.com says...
[quoted text clipped - 23 lines]
> be adjusted to let pass all traffic on port 50000 between the XP clients
> and the W2K server.
Philip Wright - 20 Dec 2006 15:42 GMT
> Hello,
>
> This has been posted a few times but still I could not find a way to
> connect to our database.  We run DB2 Express on WIN2K server with XP
> clients.  I can ping inside network and to the Internet from the
> server, so TCP/IP is ok.  The DB2COMM=TCPIP is set also.

Try checking the hosts file on the client. I had a similar problem
with a bad hosts file on an XP client.

-Philip
Mikael Arhelger - 20 Dec 2006 16:42 GMT
Hello,

My host file only shows:

Win XP client:
127.0.0.1       localhost

WIN2K Server:
127.0.0.1       localhost
192.168.0.1   safe01.safe.com.hk

All looks ok.

Mikael

> > Hello,
>
[quoted text clipped - 5 lines]
>
> -Philip
Malmostus "Lacedemone" - 21 Dec 2006 15:30 GMT
> Hello,

Hello:

1)verify on the db2 server in the services file located in
C:\WINDOWS\system32\drivers\etc
that the corresponding port for the service : db2c_DB2

2) On the server , after the db2start,  netstat -nA  shows the corresponding
port number in listening status.

3)On the client open the db2 command window  :
db2 Catalog TCPIP NODE <nodename>  remote <Db2 server host name> SERVER
<port number  for poin 1 and

db2 Catalog database <db name > ALIAS <alias name> at node <nodename for
point 3>

db2  DB2 terminate.

4)Try th connect

5)If it doesn't work try from the client fromt dos prompt:
telnet <db2 server host name>  <port number>
If the screen become blak it means that you can reach the host in the
specific port, it it hangs, there is a firwall that block the port or the
protocol in the network.

Ciao!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.