ChannelDB2

ETNTE statement reports -1476/30080 error instead of warning

Question
I'm using ETNTE( Error Tolerant Nested Table Expression) feature in Federation Server. As illustrated in the following step 3#, why I get -1476/30080 error instead of warning to tolerate the error?

1. n1 is a nickname of DB2 LUW Table. query n1 to initialize connection between Fed server to datasource.
db2 "select * from n1"

C1
-----
n1

1 record(s) selected.



2. on datasource server, issue "db2stop force"

3. issue ETNTE statement. It's not Initial connection error. ETNTE won't
work. Then bad connection will be cleaned up.

db2 -a "SELECT * FROM Table RETURN DATA UNTIL FEDERATED SQLSTATE '08001'
SQLCODE -1336, -30080, -30081, -30082 WITHIN (SELECT * FROM n1) AS
ETNTE1 UNION all SELECT * FROM t1"



SQLCA Information
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1476 sqlerrml: 6
sqlerrmc: -30080
sqlerrp : SQLRR0F7
sqlerrd : (1) -2145779603 (2) 0 (3) 0
(4) 0 (5) -200 (6) 0
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 40506



4. issue ETNTE statement again. Now it's Initial connection error. ETNTE
will work.
db2 -a "SELECT * FROM Table RETURN DATA UNTIL FEDERATED SQLSTATE '08001'
SQLCODE -1336, -30080, -30081, -30082 WITHIN (SELECT * FROM n1) AS
ETNTE1 UNION all SELECT * FROM t1"


C1
-----
t1
t2

2 record(s) selected.

SQLCA Information
sqlcaid : SQLCA sqlcabc: 136 sqlcode: 0 sqlerrml: 0
sqlerrmc:
sqlerrp : SQLRI01F
sqlerrd : (1) -2147221503 (2) 1 (3) 0
(4) 0 (5) 0 (6) 0
sqlwarn : (1) W (2) (3) (4) (5) (6) E
(7) (8) (9) (10) (11)
sqlstate: 00000



Answer

This is work-as-designed. For connection failure/loss , Federation Server can only tolerate
initial connection failure.

This is also mentioned in the whitepaper:


The ETNTE can tolerate the following errors:
* Initial connection failures (Communication or authentication errors)


To workaround problem, your application needs to check error code and re-issue the SQL once again(like above step4#). The ETNET will work in subsequent SQL and issue only a warning.


Views: 467

Tags: -1476, 30080, DB2, ETNTE, Error, Expression, Information, Integration, Nested, Table, More…Tolerant

Comment

You need to be a member of ChannelDB2 to add comments!

Join ChannelDB2

Try BLU Acceleration on Cloud

© 2014   Created by channeldb2.

Badges  |  Report an Issue  |  Terms of Service