473,411 Members | 2,230 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,411 software developers and data experts.

Invalid packages after dropping Prmary key : URGENT

Need urgent help....

I wanted update one table which has a primary key and also has few
dependents.

I dropped Primary key before update sothat it won't affect the
dependent tables.

After dropping promary key, I could see many packages were invalid in
syscat.packages (VALID column).

Can anyone help me in understanding this please ?

Once I issue db2rbind, all packages will be VALID.
Nov 12 '05 #1
4 3993
"Kumar" <ku***@tumkurcity.com> wrote in message
news:2f**************************@posting.google.c om...
Need urgent help....

I wanted update one table which has a primary key and also has few
dependents.

I dropped Primary key before update sothat it won't affect the
dependent tables.

After dropping promary key, I could see many packages were invalid in
syscat.packages (VALID column).

Can anyone help me in understanding this please ?

Once I issue db2rbind, all packages will be VALID.


The access plan in the package was dependent on the primary key. This could
be because DB2 created a unique index on the primary key and the index was
used in the access path, or for some other reason.

When an invalid package is executed, DB2 does an automatic rebind so that
DB2 can determine a new access path. If the rebind fails (for example, if an
referenced table, view or column is missing) the package is marked as
inoperative.
Nov 12 '05 #2
"Kumar" <ku***@tumkurcity.com> wrote in message
news:2f**************************@posting.google.c om...
Need urgent help....

I wanted update one table which has a primary key and also has few
dependents.

I dropped Primary key before update sothat it won't affect the
dependent tables.

After dropping promary key, I could see many packages were invalid in
syscat.packages (VALID column).

Can anyone help me in understanding this please ?

Once I issue db2rbind, all packages will be VALID.


The access plan in the package was dependent on the primary key. This could
be because DB2 created a unique index on the primary key and the index was
used in the access path, or for some other reason.

When an invalid package is executed, DB2 does an automatic rebind so that
DB2 can determine a new access path. If the rebind fails (for example, if an
referenced table, view or column is missing) the package is marked as
inoperative.
Nov 12 '05 #3
Ian
Mark A wrote:
"Kumar" <ku***@tumkurcity.com> wrote in message
news:2f**************************@posting.google.c om...
Need urgent help....

I wanted update one table which has a primary key and also has few
dependents.

I dropped Primary key before update sothat it won't affect the
dependent tables.

After dropping promary key, I could see many packages were invalid in
syscat.packages (VALID column).

Can anyone help me in understanding this please ?

Once I issue db2rbind, all packages will be VALID.

The access plan in the package was dependent on the primary key. This could
be because DB2 created a unique index on the primary key and the index was
used in the access path, or for some other reason.

When an invalid package is executed, DB2 does an automatic rebind so that
DB2 can determine a new access path. If the rebind fails (for example, if an
referenced table, view or column is missing) the package is marked as
inoperative.


You can avoid this by creating a unique index _prior_ to adding the primary
key. For example:

create table t1 (
c1 int not null,
c2 char(20)
);

create unique index t1_px
on t1 (c1);

alter table t1
add constraint pk_t1
primary key (c1);
The primary key will then use the index t1_px instead of automatically
creating and index for the primary key. This also has an advantage in
that it allows you to specify other options for this index, such as
allowing reverse scans or including other keys in the unique index.
Good luck,


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #4
Ian
Mark A wrote:
"Kumar" <ku***@tumkurcity.com> wrote in message
news:2f**************************@posting.google.c om...
Need urgent help....

I wanted update one table which has a primary key and also has few
dependents.

I dropped Primary key before update sothat it won't affect the
dependent tables.

After dropping promary key, I could see many packages were invalid in
syscat.packages (VALID column).

Can anyone help me in understanding this please ?

Once I issue db2rbind, all packages will be VALID.

The access plan in the package was dependent on the primary key. This could
be because DB2 created a unique index on the primary key and the index was
used in the access path, or for some other reason.

When an invalid package is executed, DB2 does an automatic rebind so that
DB2 can determine a new access path. If the rebind fails (for example, if an
referenced table, view or column is missing) the package is marked as
inoperative.


You can avoid this by creating a unique index _prior_ to adding the primary
key. For example:

create table t1 (
c1 int not null,
c2 char(20)
);

create unique index t1_px
on t1 (c1);

alter table t1
add constraint pk_t1
primary key (c1);
The primary key will then use the index t1_px instead of automatically
creating and index for the primary key. This also has an advantage in
that it allows you to specify other options for this index, such as
allowing reverse scans or including other keys in the unique index.
Good luck,


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #5

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

Similar topics

2
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
0
by: Wesley Kincaid | last post by:
I'm attempting to run a simple query through MySQLdb's cursor.execute(). However, when the request includes a timestamp field, I'm getting "ValueError: invalid literal for int(): 9-." Could...
7
by: Oliver Elphick | last post by:
Debian packages of 7.4 have been uploaded to Debian's experimental archive. Because of certain issues with interlocking dependencies, I will not move them to unstable until version 7.3.4-9 is...
0
by: Kumar | last post by:
Need urgent help.... I wanted update one table which has a primary key and also has few dependents. I dropped Primary key before update sothat it won't affect the dependent tables. After...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
15
by: David | last post by:
Hi, I have built a web application that will be a very high profile application. We had tested it, demonstrated it and shown that it all works. On a dress rehearsal run through, it failed...
3
by: Artur | last post by:
(DB2 9) Inoperative packages must be explicitly rebound, but invalid packages can be rebound automatically. Do you know what is the difference? Example: create function f1 create procedure...
9
by: AG | last post by:
I occassionally get the following exception from an ASP.NET 2.0 Web Application running on a shared web host. I have no way of knowing what the actual request page was as it never happens when I...
8
by: mryangza | last post by:
Hi all, Is there a mechanism for manually marking routine packages as inoperative in DB2LUW? The problem I'm trying to solve is one of recreating interdependent functions. My application...
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:
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.