473,804 Members | 2,201 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 4028
"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
5057
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
1478
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
2063
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
9249
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
2260
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
2542
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
9593
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
10343
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...
0
9169
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
7633
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
6862
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
5529
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...
1
4306
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
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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.