When I am trying to load 2 tables which exist in the same tablespace, I get - 290 error. Before loading each table, I have quiesce table using db2 api sqluvqdp. So i have used this api twice before using load command.
You can't load two tables in the same tablespace concurrently since the load acquires an exclusive lock on the tablespace. You can either address this by putting different tables in different tablespaces or by doing non-recoverable loads(load config file) and puttin some dependancies in the jobs so they do not run concurrently.
When would the locks be removed by DB2 from the tablespace. Are the locks removed after the load immediately or with a database commit.
I's describe the steps in short:
1. Export Table A using sqluexpr
2. QUIESCE TABLESPACE FOR TABLE A using sqluvqdp
3. LOAD TABLE A using sqluload
4. Export Table B using sqluexpr
5. QUIESCE TABLESPACE FOR TABLE B using sqluvqdp
6. LOAD TABLE B using sqluload
7. commit the changes in database
Interesting thing is that the same program is working in one region and not working in aonther region. In both the regions, database and data is same. Both Table A and B reside in same tablespace.
The only difference is that in one region, the forward recovery is disabled.
Don't know what you mean by region - another database in another instance? I do not think that forward recovery should affect this. Where does it work - in the one with forward recovery or the one without?
Which quiesce mode are you using? Are you resetting the quiesce mode between the loads?
Also, just out of curiosity, why aren't you using the load or the autoload command which would handle all this for you?