473,785 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

set integrity command

I have 120 tables which mostly dependent to each other. Just did a
db2move for all data. Now causing SQL0668 error when accessing tables
with dependencies.
Now I am running SET INTEGRITY command for each tables one-by-one. :(

Is there a way to run SET INTEGRITY the parent table and cascade the
state to child table? If yes, what's the syntax?

Oct 13 '06 #1
5 7578
mahhsuri wrote:
I have 120 tables which mostly dependent to each other. Just did a
db2move for all data. Now causing SQL0668 error when accessing tables
with dependencies.
Now I am running SET INTEGRITY command for each tables one-by-one. :(

Is there a way to run SET INTEGRITY the parent table and cascade the
state to child table? If yes, what's the syntax?
Take a look at the syntax diagram. SET INTEGRITY accepts a list of table
names.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Oct 13 '06 #2
mahhsuri wrote:
I have 120 tables which mostly dependent to each other. Just did a
db2move for all data. Now causing SQL0668 error when accessing tables
with dependencies.
Now I am running SET INTEGRITY command for each tables one-by-one. :(

Is there a way to run SET INTEGRITY the parent table and cascade the
state to child table? If yes, what's the syntax?
http://publib.boulder.ibm.com/infoce...n/r0000998.htm

Hint: SET INTEGRITY FOR tab1, tab2 ...

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 13 '06 #3
Knut Stolze wrote:
http://publib.boulder.ibm.com/infoce...n/r0000998.htm

Hint: SET INTEGRITY FOR tab1, tab2 ...

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
But if any of the listed tables are not in check pending state, then
the entire statement fails.

Hint: I would really like to see this changed.

Oct 13 '06 #4
Mark A wrote:
Knut Stolze wrote:
>>
http://publib.boulder.ibm.com/infoce...n/r0000998.htm
>>
Hint: SET INTEGRITY FOR tab1, tab2 ...

But if any of the listed tables are not in check pending state, then
the entire statement fails.
You can query the system catalog tables (SYSCAT.TABLES) up front to
determine the tables that need SET INTEGRITY to be run agains them.
Hint: I would really like to see this changed.
Then you may want to open a PMR.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 16 '06 #5
"Knut Stolze" <st****@de.ibm. comwrote in message
news:eg******** **@lc03.rz.uni-jena.de...
Then you may want to open a PMR.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany
It's not a defect, rather it would be an additional feature that I would
like to see added (and a lot of other DBA's would like to see added).
Oct 16 '06 #6

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

Similar topics

3
2576
by: Nagib Abi Fadel | last post by:
HI, let's say i have a tansaction table called TRANSACTION (transaction_id,amount,type,type_id) Let's say a transaction can have multiple types: TYPE1, TYPE2 for example. EACH type has his own definition and his own table. Every transaction has a type that could be type1 or type2 that's why if the type is TYPE1 i want to make a referential integrity to the TYPE1_TABLE and if the type is TYPE2 i want to make a referential integrity to...
4
15839
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
2
9983
by: Brice | last post by:
Hello, Sorry if this is a basic question but I can't seem to find the answer in the DB2 tutorial series or my DB2 manuals. How does one check the data integrity and referential integrity of an instance before running a backup? I see how one can run "db2ckbkp" after the backup has run, and I've seen some discussion of checksums in past postings, but what I'm looking for is more of: #!/bin/sh
6
2044
by: Christian Rank | last post by:
Hello, I came across the following problem with integrity constraints and PL/pgSQL (PostgreSQL version used: 7.4.2): I defined the following tables, constraints and data: create table a (n integer); create table b (n integer); alter table a add primary key (n);
12
2395
by: technocrat | last post by:
I am trying to laod 2 tables and set integrtiy on them, but the second tables fails ( both are related and SET INTEGRITY ion first table succeeds) saying constraint violation....is there a way to find out which records are violating....?? may be through try catch a SQLException...??? but how?? any suggestions are welcome!
80
7898
by: Andrew R | last post by:
Hi I'm creating a series of forms, each with with around 15-20 text boxes. The text boxes will show data from tables, but are unbound to make them more flexible. I want the form to be used for both adding new data and modifying existing data. I have created a save button on the form. When the user clicks the save button, the code checks to see if there
16
5668
by: Brian Tkatch | last post by:
Is there a way to check the order in which SET INTEGRITY needs to be applied? This would be for a script with a dynamic list of TABLEs. B.
1
3788
by: Brian Tkatch | last post by:
A few questions about SET INTEGRITY. 1) Docs: The SET INTEGRITY statement is under transaction control. Using two sessions (different user, even) i tried the following. Session 1: UPDATE COMMAND OPTIONS USING C OFF Session 1: LOAD a TABLE Session 2: SysCat.Tables.Status = 'C' Session 1: SET INTEGRITY FOR table IMMEDIATE CHECKED
2
1948
by: Doug | last post by:
Hi all, I have an issue with SET INTEGRITY after loading my table. Set integrity does not see integrity violations checking by trigger. My shell script does the following steps: - LOAD FROM ... REPLACE INTO my_table - SET INTEGRITY FOR my_table IMMEDIATE CHECKED We have just a trigger, verifying loaded data from my_table with an another table, nothing else. SET INTEGRITY does not detect my bad
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.