View previous topic :: View next topic
|
Author |
Message |
Satish Chandar
New User
Joined: 05 Apr 2007 Posts: 2 Location: Chennai
|
|
|
|
Hi all,
This is my first post and i would be very happy on any kind of help.
I have been tring to Load Replace into a particular partition. While the
job is executing, i need to Read the database. Ie., While the partition is load replaced, i need to access the same.
I referred to some manuals and found REUSE might work. But it is not working as i get SQLCODE -911.
LOAD DATA RESUME YES LOG NO NOCOPYPEND REUSE
INDDN SYSREC INTO TABLE XXXX.YYYYY PART 13 REPLACE (
BUS_CTR_CD POSITION(001) CHAR(03),
TRK_ID POSITION(176) CHAR(13),
STTL_SEQ_NO POSITION(189) INTEGER,
SPLIT_PAY_NO POSITION(193) SMALLINT,
STTL_SE_ACCT_NO POSITION(195) CHAR(10),
STTL_DT POSITION(205) DATE EXTERNAL(10),
)
Any sort of help would be welcome.
Thanks, Satish |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
But it is not working as i get SQLCODE -911. |
what does the manual say about the -911 SQLCODE ?
I do not see any logic into reading something that is being reloaded
what about data consistency?
apart db2 issues! (-911)
the whole process needs to be reviewed a bit |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Sathish,
Are you telling, while load replacing the data, you want to read the data in that table.
REUSE is for entirely for different purpose. That is while LOAD replacing, it will DELETE & REDEFINE datasets. If you don't want that to happen and save that time, you go for REUSE.
With SHRLEVEL CHANGE you read data while loading.
LOG YES data being loaded are logged.
Try something like
Code: |
LOAD DATA LOG YES
SHRLEVEL CHANGE
INTO TABLE XXXX.YYYYY PART 13 RESUME YES |
Haven't TESTED. TRY it OUT !
Quote: |
what about data consistency? |
I think DATA CONSISTENCY will be taken care by LOG YES.
Open for your suggestions......
Sushanth |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
think DATA CONSISTENCY will be taken care by LOG YES. |
LOG YES will take care of DATA INTEGRITY
DATA INTEGRITY is a rdbms concern regardless of the application
DATA CONSISTENCY is an application related concern
for example if it were possible to query a table during a load
the query might return a not found simply because the related rows have not been loaded yet .....
but in other application table the related data might be there
DATA INTEGRITY is there, not DATA CONSISTENCY |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Yes you are right ENRICO.
Thank You for enlighting me with the defination of the terms.
I don't think shops will go for this kinda LOADing. They will be going for the regular and the best one, NO ACCESS during LOAD.
Emergency kinda situation, we can opt for this kind of loading.
I till now, never seen a scenario like that.
TESTING=LEARNING
with this kind of stuff.
Sushanth |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
While the
job is executing, i need to Read the database. |
No, you truly do not.
If you execute jobs this way, the very best you can hope for is an abend. If the process somehow "successfully" completes, you have only questionable results. You may be missing some or all of the data for a particular query. |
|
Back to top |
|
|
|