473,738 Members | 6,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot create procedure with create cluster index in it

I am trying to create a store proc that contain a create index with
the cluster option and I receive

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0623N A clustering index already exists on table "PGIR.TF_RR CE".
LINE
NUMBER=35. SQLSTATE=55012

I did try to use
CALL SET_ROUTINE_OPT S('DYNAMICRULES RUN VALIDATE RUN')
before calling the create store proc but I still get the error.

If I skip the cluster option in the create index, then the create proc
work!!!

Any idea how to create the store proc in db2 without object
validation?

Thanks in advance

$ db2level
DB21085I Instance "db2dev6" uses "64" bits and DB2 code release
"SQL08024"
with level identifier "03050106".
Informational tokens are "DB2 v8.1.1.104", "s060120", "U805924", and
FixPak
"11".
Product is installed at "/usr/opt/db2_08_FP11".

Feb 2 '07 #1
4 3747
On Feb 2, 8:06 am, "JohnnyDeep " <jean-guy....@desjard ins.comwrote:
I am trying to create a store proc that contain a create index with
the cluster option and I receive

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0623N A clustering index already exists on table "PGIR.TF_RR CE".
LINE
NUMBER=35. SQLSTATE=55012

I did try to use
CALL SET_ROUTINE_OPT S('DYNAMICRULES RUN VALIDATE RUN')
before calling the create store proc but I still get the error.

If I skip the cluster option in the create index, then the create proc
work!!!

Any idea how to create the store proc in db2 without object
validation?

Thanks in advance

$ db2level
DB21085I Instance "db2dev6" uses "64" bits and DB2 code release
"SQL08024"
with level identifier "03050106".
Informational tokens are "DB2 v8.1.1.104", "s060120", "U805924", and
FixPak
"11".
Product is installed at "/usr/opt/db2_08_FP11".
Hi, Johnny:

I'm sure you're aware that only one clustering index can exist on a
table at any one time. There's no way around this. So, is there a step
in your procedure where you're deleting this "other" clustering index
first, and your issue/question is really one of timing? Are you
getting the error when trying to create (as opposed to run) the SP?

--Jeff

Feb 2 '07 #2
On Feb 2, 1:27 pm, "jefftyzzer " <jefftyz...@sbc global.netwrote :
On Feb 2, 8:06 am, "JohnnyDeep " <jean-guy....@desjard ins.comwrote:


I am trying to create a store proc that contain a create index with
the cluster option and I receive
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0623N A clustering index already exists on table "PGIR.TF_RR CE".
LINE
NUMBER=35. SQLSTATE=55012
I did try to use
CALL SET_ROUTINE_OPT S('DYNAMICRULES RUN VALIDATE RUN')
before calling the create store proc but I still get the error.
If I skip the cluster option in the create index, then the create proc
work!!!
Any idea how to create the store proc in db2 without object
validation?
Thanks in advance
$ db2level
DB21085I Instance "db2dev6" uses "64" bits and DB2 code release
"SQL08024"
with level identifier "03050106".
Informational tokens are "DB2 v8.1.1.104", "s060120", "U805924", and
FixPak
"11".
Product is installed at "/usr/opt/db2_08_FP11".

Hi, Johnny:

I'm sure you're aware that only one clustering index can exist on a
table at any one time. There's no way around this. So, is there a step
in your procedure where you're deleting this "other" clustering index
first, and your issue/question is really one of timing? Are you
getting the error when trying to create (as opposed to run) the SP?

--Jeff- Hide quoted text -

- Show quoted text -
Hi Jeff,

I am receiving the error while trying to create the store procedure.

I am aware that only one cluster index should be create for a table.
I just want to create the store procedure without dropping the index
first.

The funny part is that if I create the store procedure containing a
create index on a table currently having the index, it work. It`s only
the cluster option that seem to be validate at the creation of the
store procedure (and not the fact that the index already exists)

There should be a way to create a store procedure without checking the
status of the objects within the store procedure at bind time. I just
can find the way to solve that issue.

Regards,
Feb 5 '07 #3
On Feb 5, 7:29 am, "JohnnyDeep " <jean-guy....@desjard ins.comwrote:
On Feb 2, 1:27 pm, "jefftyzzer " <jefftyz...@sbc global.netwrote :


On Feb 2, 8:06 am, "JohnnyDeep " <jean-guy....@desjard ins.comwrote:
I am trying to create a store proc that contain a create index with
the cluster option and I receive
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0623N A clustering index already exists on table "PGIR.TF_RR CE".
LINE
NUMBER=35. SQLSTATE=55012
I did try to use
CALL SET_ROUTINE_OPT S('DYNAMICRULES RUN VALIDATE RUN')
before calling the create store proc but I still get the error.
If I skip the cluster option in the create index, then the create proc
work!!!
Any idea how to create the store proc in db2 without object
validation?
Thanks in advance
$ db2level
DB21085I Instance "db2dev6" uses "64" bits and DB2 code release
"SQL08024"
with level identifier "03050106".
Informational tokens are "DB2 v8.1.1.104", "s060120", "U805924", and
FixPak
"11".
Product is installed at "/usr/opt/db2_08_FP11".
Hi, Johnny:
I'm sure you're aware that only one clustering index can exist on a
table at any one time. There's no way around this. So, is there a step
in your procedure where you're deleting this "other" clustering index
first, and your issue/question is really one of timing? Are you
getting the error when trying to create (as opposed to run) the SP?
--Jeff- Hide quoted text -
- Show quoted text -

Hi Jeff,

I am receiving the error while trying to create the store procedure.

I am aware that only one cluster index should be create for a table.
I just want to create the store procedure without dropping the index
first.

The funny part is that if I create the store procedure containing a
create index on a table currently having the index, it work. It`s only
the cluster option that seem to be validate at the creation of the
store procedure (and not the fact that the index already exists)

There should be a way to create a store procedure without checking the
status of the objects within the store procedure at bind time. I just
can find the way to solve that issue.

Regards,- Hide quoted text -

- Show quoted text -
One thing you might want to try is to rewrite the CREATE INDEX
statement in the stored proc as dynamic SQL.

--Jeff

Feb 5 '07 #4
This error is produced when DB2 compiles /(checks the correctness of)
the stored procedure. It notices that you already have a clustered
index on the table, and tells you so.
Like Jeff mentioned, if you turn the CREATE INDEX statement into
dynamic SQL then you shouldn't have a problem.
Feb 6 '07 #5

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

Similar topics

17
49832
by: Philip Yale | last post by:
I'm probably going to get shot down with thousands of reasons for this, but I've never really heard or read a convincing explanation, so here goes ... Clustered indexes are more efficient at returning large numbers of records than non-clustered indexes. Agreed? (Assuming the NC index doesn't cover the query, of course) Since it's only possible to have one clustered index, why is this almost always used for the primary key, when by...
0
2815
by: Guy Deprez | last post by:
Hi, i'm having a problem to create indexes. STEP 1 ----------- Connection is OK (you can find the string at the end of the message) Table ("Couleurs") creation is OK STEP 2. Index Creation
2
1777
by: Adam Kavan | last post by:
I have a table that II am constantly inserting into (around 10 times a second right now but hope to increase latter). I hold these rows for a week then summarize and delete them. During that week I need to access ranges of these rows based on a timestamp in each row set to now() when I insert them. I have this column indexed but if I let the system run after a few weeks it can take a fairly long time to get information from this table...
6
2204
by: Robin Lawrie | last post by:
Hi, Looking for some help here! I'm adding records to a SQL 2000 DB using the objRS.AddNew and objRS.Update methods. What I'd like to do is determine the new primary key value of the added record.
1
11764
by: Dhruba Bandopadhyay | last post by:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. The above message is what I get in my ASP.NET 2.0 page. I have debugging turned on and for those who want to see the stack trace, see below. In my old web site I had a frame set with a ASP page in left frame...
1
1850
by: dunleav1 | last post by:
The table is a many row and many column table that is in a 16K page size. I am running row compression on the table. A have an index that over time have come to have a low index cluster ratio. The table does not have a primary key. I have 3 other indexes on the table and the index cluster ratio is 99% on the other three.
2
4783
by: dunleav1 | last post by:
I have a many row and many column table that is in a 16K page size. I have four indexes on the table. I am running row compression on the table. The table does not have a primary key. The table does not have a clustered index. I ran a reorg on the table and the indexes. I ran runstats on the table and the indexes after the reorg. Three indexes on the table have an index cluster ratios of 99,99,100 respectively. The fourth index has a...
1
5624
by: rdsandy | last post by:
Hi, I have a table Risk, a table Mitigation and a table RiskArchive. I am taking the RiskID, Criticality and MitigationPlan fields from Risk, and MitigationActionID from Mitigation and inserting them into RiskArchive, using a stored procedure. What happens is if there is no entry in RiskArchive for a specific RiskID, and the other fields relevant for it, then it needs to be archived, but also only if it is not duplicated. I have made an...
10
3158
by: Ian | last post by:
Henry J. wrote: MDC *guarantees* clustering, whereas a table with a clustering index will eventually require maintenance (a.k.a. reorg) to maintain the cluster ratio. That's not to say that a clustering index isn't still valuable (especially for high cardinality columns that aren't a reasonable candidate as an MDC dimension).
0
8968
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
9473
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...
0
9334
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
9259
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
6053
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
4569
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
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
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
3
2193
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.