473,796 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4027
"Kumar" <ku***@tumkurci ty.com> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
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***@tumkurci ty.com> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
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***@tumkurci ty.com> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
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.packag es (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***@tumkurci ty.com> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
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.packag es (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
5056
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, sometimes not. From mysql: mysql> show databases; +-----------+ | Database |
0
1476
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 someone please explain what I'm doing wrong? The table is served off of MySQL 4.0.20 and contains the following fields:
7
2062
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 accepted into the testing distribution. This is not a reflection on 7.4's quality but the result of a long-standing blockage in the movement of packages into testing caused by the perl packages. Unfortunately, this means that 7.4 packages won't get...
0
415
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 dropping promary key, I could see many packages were invalid in syscat.packages (VALID column).
2
9246
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 problems doing this. I wanted to implemented a generic "Helper" class like this: /** * Helper
15
2257
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 spectacularly. I was so embarrassed and felt like killing the person that made it fail. However, when it goes live, IT MUST NOT FAIL. The system has a backoffice system that takes an excel spreadsheet from the
3
6881
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 p1, that is using f1 If I recreate function f1, then when executing p1 automatically I got
9
2540
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 visit the site. The exception is trapped in the Application_Error event of global.asax and emailed to me. The only encryption in the app is the connectionStrings section of web.config.
8
2055
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 creates a number of functions during its installation. A later version of the application introduces changes to some of these functions and needs to recreate those that were affected. Now, I cannot drop some of these since they are used by
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
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
10003
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
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
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.