Skip to Content
0
Former Member
Dec 12, 2013 at 08:16 AM

SQL1031n SQLSTATE=58031 on db2 connect

2441 Views

Dear gurus,

I'm again configuring HA for my SAP system, node A and node B.

I'm using SLES 11 SP3 on DB6 10.5FP1 LUW.

The HA is configured active-active. Means that all filesystems are mounted on both nodes, and one virtual hostname on ASCS node.

Let's say the mount points are:

/usr/sap/<SID>/ASCS01

/db2/<SID>/

/sapmnt/<SID>/

etc...

I've no problem switchovering ASCS node between nodes (moving virtual IP resource).

But for the DB2 database, I have problem connecting from failover node.

When I run command: "db2 connect to <SID>" or "db2 list db directory on /db2/<SID>", it tells this message:

SQL1031N The database directory cannot be found on the indicated file system.

SQLSTATE=58031

I'll provide what I've done to this points for sake of discussion clarity:

- make db2nodes.cfg localize (that is, local file for each hostname node)

- copy db2 entries from /etc/services to other node

- no firewall

- recatalog the database using command "db2 catalog database <SID> on /db2/<SID>"

- create os user & groups with same ID and copy entries to other node [means environment variables are same between nodes]

- "db2 list db directory" on both node return the value, but "db2 list db directory on node /db2/<SID> on problematic node returns error above

- I can issue command "db2start" on both nodes successfully

- Default database path (DFTDBPATH) from "db2 get dbm cfg" is /db2/<SID> on both nodes

- db2ilist command shows db2<sid> on both nodes

Please advice.

Thanks.