473,383 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

LOAD utility followup

I'm trying to fix up a database on my server by transferring all the
readable data to a new database, and then upgrading it from db2-7 to
db2-8. I'm using the export command to dump the tables that I'm having
a hard time with to a file, then running the LOAD command on those
exports to load them back into the new clean database table by table.
I'm wondering if there is anything that needs to be done after all the
LOAD commands are finnished in order to get the database in a
production state (aside from usual routines of backups, reorgs,
runstats, etc...) that might be specific to having run the LOAD
command?

(btw, it's running on a win2k3 server -- and go easy on the db2
terminology... i'm a long time interbase admin ;) )

Sep 15 '06 #1
7 2205
You may need to run SET INTEGRITY on any tables that are in CHECK
PENDING state.

Sep 15 '06 #2

jdokos wrote:
You may need to run SET INTEGRITY on any tables that are in CHECK
PENDING state.
Would it be a better idea to run this command after each LOAD command,
or can I save it up for after having run them (should only be running
about 6 LOAD statements in total)?

I searched the db2 docs on "SET INTEGRITY" and came up with this
sample:

SET INTEGRITY FOR <tablenameIMMEDIATE CHECKED

Does that sound right, or would "SET INTEGRITY" on it's own do the
entire database?

Sep 15 '06 #3
You cannot run SET INTEGRITY for the entire database. You have to do it
one table at a time.

After all the LOAD's are done do this to find out which table's are in
check pending

db2 "select tabname from syscat.tables where status='C'"

cheers...
Shashi Mannepalli
clilush wrote:
jdokos wrote:
You may need to run SET INTEGRITY on any tables that are in CHECK
PENDING state.

Would it be a better idea to run this command after each LOAD command,
or can I save it up for after having run them (should only be running
about 6 LOAD statements in total)?

I searched the db2 docs on "SET INTEGRITY" and came up with this
sample:

SET INTEGRITY FOR <tablenameIMMEDIATE CHECKED

Does that sound right, or would "SET INTEGRITY" on it's own do the
entire database?
Sep 15 '06 #4

Shashi Mannepalli schrieb:
You cannot run SET INTEGRITY for the entire database. You have to do it
one table at a time.

After all the LOAD's are done do this to find out which table's are in
check pending

db2 "select tabname from syscat.tables where status='C'"

cheers...
Shashi Mannepalli
thats not completely true.

you can list more than 1 table.

SET INTEGRITY FOR TAB1,TAB2,TAB3 IMMEDIATE CHECKED

this has the advantage that you don't have to worry about the checking
order of the tables.

also:
SEQUENCES:
if you used sequences in the old DB for prim-key generation, you must
set the seq in the new DB higher than the last used value (ALTER
SEQUENCE .... RESTART WITH XX) otherwise you will get already generated
values

IDENTITY COLUMNS:
same there . . .
(alter table ${TABSCHEMA}.${TABNAME} alter column ${COLNAME} restart
with ${VALUE} )

Sep 18 '06 #5

j_******@yahoo.com wrote:
Shashi Mannepalli schrieb:
You cannot run SET INTEGRITY for the entire database. You have to do it
one table at a time.

After all the LOAD's are done do this to find out which table's are in
check pending

db2 "select tabname from syscat.tables where status='C'"

cheers...
Shashi Mannepalli

thats not completely true.

you can list more than 1 table.

SET INTEGRITY FOR TAB1,TAB2,TAB3 IMMEDIATE CHECKED

this has the advantage that you don't have to worry about the checking
order of the tables.

also:
SEQUENCES:
if you used sequences in the old DB for prim-key generation, you must
set the seq in the new DB higher than the last used value (ALTER
SEQUENCE .... RESTART WITH XX) otherwise you will get already generated
values

IDENTITY COLUMNS:
same there . . .
(alter table ${TABSCHEMA}.${TABNAME} alter column ${COLNAME} restart
with ${VALUE} )
Thanks! This helps a tonne!
There is actually a cool app that the software designers sent with the
database that will allow me to transfer the generators to a new
database but I have found int he past that I have to delete a record
from the table before being able to insert it -- which follows the same
comment about sequences that "j" mentions above.

I'm actually just finishing up the load commands now and will be
applying the SET INTEGRITY commands soon...

Sep 19 '06 #6
<j_******@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
thats not completely true.

you can list more than 1 table.

SET INTEGRITY FOR TAB1,TAB2,TAB3 IMMEDIATE CHECKED

this has the advantage that you don't have to worry about the checking
order of the tables.
I may be wrong, but my recollection is that if you set integrity with more
than one table in the same statement (as above), then if any one of the
tables is not in check pending state, then it throws an error and the entire
statement fails. Please correct me if I am wrong.
Sep 19 '06 #7

Mark A schrieb:
<j_******@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
thats not completely true.

you can list more than 1 table.

SET INTEGRITY FOR TAB1,TAB2,TAB3 IMMEDIATE CHECKED

this has the advantage that you don't have to worry about the checking
order of the tables.

I may be wrong, but my recollection is that if you set integrity with more
than one table in the same statement (as above), then if any one of the
tables is not in check pending state, then it throws an error and the entire
statement fails. Please correct me if I am wrong.
the meaning was not to list ALL the tables in the database! only the
ones CHECK PENDING (i'm using a script (unix) which selects the tables
in CHECK PENDING and generates from there a list of tables to include
in the SET INTEGRITY).
another problem with including several tables ist that if the there is
a vialoation in one table (wrong data) the stmt fails for all...

Sep 19 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rick | last post by:
When using the load utility on a CSV file, it seems I always need to edit the input file and add an extra comma after the last field in order for MySql to parse the line properly. I use a...
7
by: Xie Qing | last post by:
Hi all, Is there a tool or view to display the status of a Load utility job on windows or Unix(say loading few million rows into a table)? I understand in OS/390 there is a dis utility to show...
3
by: claus.hirth | last post by:
When I execute the following statment using the Command Center it works: LOAD CLIENT FROM 'Y:\\TheFixedWidthData.txt' OF ASC METHOD L ( 1 1,2 11,12 17) REPLACE INTO S00.TheTargetTable...
6
by: jrthor2 | last post by:
I have a shell script I am trying to run that loads a table from a control file. The file I am trying to load is delimited by the "}" character. How do I set the delimeter code? Here is my load...
5
by: Konstantin Andreev | last post by:
Recently I became interested, - Are the data, bulk loaded in the table with LOAD utility, consume the same disk space as loaded with IMPORT utility? The answer turned out to be NOT ! Here is a...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
1
by: dbuser | last post by:
Hi I am new to Db2. I am planning to load around 5 million Data using DB2 LOAD utility. Do this utility have an inbuilt COMMIT statement so that i do not get any table locks/deadlock error. ...
0
by: Eric Davidson | last post by:
I am try to find a way to get load to reject a record if the data is too large and not just truncate it. eg. c:\temp\fred3.txt ------ a23456789012345678901234567890...
2
by: venkateswari | last post by:
Need Information on ‘how to terminate a load utility?’ I am getting the following error while loading a table: DB2 OBJECT DEFINITION(S) HAVE CHANGED PRIOR TO UTILITY RESTART. UNABLE TO...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.