473,387 Members | 1,517 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,387 software developers and data experts.

DB2 UDB LUW: Upgrade all type-1 in indices to type-2, check (afterwards)

Environment: DB2 UDB LUW.

The be able to use on-line reorg, indices must be of type-2.

1. How to migrate a 8.1 database that was created on 7.1 (with type-1
indices)at once to type-2 indices

2. how to check that indeed all indices are type-2 indices (or in
general how to know if an index is type-1 or type-2).
Bernard Dhooghe
Nov 12 '05 #1
8 5181
"Bernard Dhooghe" <no***@attglobal.net> wrote in message
news:25**************************@posting.google.c om...
Environment: DB2 UDB LUW.

The be able to use on-line reorg, indices must be of type-2.

1. How to migrate a 8.1 database that was created on 7.1 (with type-1
indices)at once to type-2 indices
You can regorg the index, which will autmatically migrate them (if not
already migrated) unless you use the cleanup option on the reorg.

You can also use the CONVERT option of the reorg to convert them to type-2
(without reorging them).

2. how to check that indeed all indices are type-2 indices (or in
general how to know if an index is type-1 or type-2).
I believe the INSPECT INDEX command can tell you, but it is supposedly
slower than the reorg with convert option.

Bernard Dhooghe

Nov 12 '05 #2
The REORG command in V8 has an option to CONVERT the indexes of any
table from Type 1 to 2.
I'm not sure but I think the syscat.indexes has a column that will
indicate the type.
All indexes will stay of Type 1 on any table after migrate, even new
ones created, until the convert has been done.
HTH, Pierre.

Bernard Dhooghe wrote:
Environment: DB2 UDB LUW.

The be able to use on-line reorg, indices must be of type-2.

1. How to migrate a 8.1 database that was created on 7.1 (with type-1
indices)at once to type-2 indices

2. how to check that indeed all indices are type-2 indices (or in
general how to know if an index is type-1 or type-2).
Bernard Dhooghe


--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #3
"Pierre Saint-Jacques" <se*****@attglobal.net> wrote in message
news:41**************@attglobal.net...
The REORG command in V8 has an option to CONVERT the indexes of any
table from Type 1 to 2.
I'm not sure but I think the syscat.indexes has a column that will
indicate the type.
All indexes will stay of Type 1 on any table after migrate, even new
ones created, until the convert has been done.
HTH, Pierre.


REORG INDEXES will always convert type-1 indexes to type-2 indexes unless
you use the CLEANUP option.

If you use the CONVERT option on the REORG, the indexes will be converted to
type-2, but will not actually be reorged.
Nov 12 '05 #4
"Mark A" <no****@nowhere.com> wrote in message news:<Sh****************@news.uswest.net>...
"Pierre Saint-Jacques" <se*****@attglobal.net> wrote in message
news:41**************@attglobal.net...
The REORG command in V8 has an option to CONVERT the indexes of any
table from Type 1 to 2.
I'm not sure but I think the syscat.indexes has a column that will
indicate the type.
All indexes will stay of Type 1 on any table after migrate, even new
ones created, until the convert has been done.
HTH, Pierre.


REORG INDEXES will always convert type-1 indexes to type-2 indexes unless
you use the CLEANUP option.

If you use the CONVERT option on the REORG, the indexes will be converted to
type-2, but will not actually be reorged.


REORG is on table level. So to migrate indexes, a table by table
approach is needed at this time.

Knowing for sure if an index is type-1 or type-2 is something more
than nice to know. But I don't find a command for this (or a
documented syscat indicator).

Bernard Dhooghe
Nov 12 '05 #5
Bernard,

you can use only :
db2 "inspect check tablespaces tbspaceid <nn> results keep inspect.out",
after that you have to format the output:
db2inspf inspect.out inspect.rpt

You will find a line in the report like:

"The index type is 2 for this table"
after a convert to index-type2.

regards,
Joachim Müller

"Bernard Dhooghe" <no***@attglobal.net> schrieb im Newsbeitrag
news:25**************************@posting.google.c om...
"Mark A" <no****@nowhere.com> wrote in message

news:<Sh****************@news.uswest.net>...
"Pierre Saint-Jacques" <se*****@attglobal.net> wrote in message
news:41**************@attglobal.net...
The REORG command in V8 has an option to CONVERT the indexes of any
table from Type 1 to 2.
I'm not sure but I think the syscat.indexes has a column that will
indicate the type.
All indexes will stay of Type 1 on any table after migrate, even new
ones created, until the convert has been done.
HTH, Pierre.


REORG INDEXES will always convert type-1 indexes to type-2 indexes unless you use the CLEANUP option.

If you use the CONVERT option on the REORG, the indexes will be converted to type-2, but will not actually be reorged.


REORG is on table level. So to migrate indexes, a table by table
approach is needed at this time.

Knowing for sure if an index is type-1 or type-2 is something more
than nice to know. But I don't find a command for this (or a
documented syscat indicator).

Bernard Dhooghe

Nov 12 '05 #6
"Joachim Müller" <jo*****@douglas-informatik.de> wrote in message news:<ce**********@news.dtag.de>...
Bernard,

you can use only :
db2 "inspect check tablespaces tbspaceid <nn> results keep inspect.out",
after that you have to format the output:
db2inspf inspect.out inspect.rpt

You will find a line in the report like:

"The index type is 2 for this table"
after a convert to index-type2.

regards,
Joachim Müller


Joachim,

This is what I was looking for, thank you. Works fine (Remark: the
check does not need a s on tablespace: inspect check tablespace
tbspaceid ...).
Bernard
Nov 12 '05 #7
You can also use the following command.

db2 "load query table <tablename>"

If the output returns as below, then all the indices on the table are type 2.
Tablestate:
Normal

If the indices are type-1, then it will clearly spell out as Type 1.

Anand

no***@attglobal.net (Bernard Dhooghe) wrote in message news:<25**************************@posting.google. com>...
"Joachim Müller" <jo*****@douglas-informatik.de> wrote in message news:<ce**********@news.dtag.de>...
Bernard,

you can use only :
db2 "inspect check tablespaces tbspaceid <nn> results keep inspect.out",
after that you have to format the output:
db2inspf inspect.out inspect.rpt

You will find a line in the report like:

"The index type is 2 for this table"
after a convert to index-type2.

regards,
Joachim Müller


Joachim,

This is what I was looking for, thank you. Works fine (Remark: the
check does not need a s on tablespace: inspect check tablespace
tbspaceid ...).
Bernard

Nov 12 '05 #8
ag*************@hotmail.com (AnandG) wrote in message news:<c1**************************@posting.google. com>...
You can also use the following command.

db2 "load query table <tablename>"

If the output returns as below, then all the indices on the table are type 2.
Tablestate:
Normal

If the indices are type-1, then it will clearly spell out as Type 1.

Anand

Works also you mention.
..
A table with type-1 indexes shows:

Tablestate:
Normal
Type-1 Indexes

With type-2:

Tablestate:
Normal

Thank you for the info.

Bernard.
Nov 12 '05 #9

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

Similar topics

0
by: Philip Nelson | last post by:
Our next meeting will take place shortly and the "official" announcement is attached below. If you would like more information about our group then don't hesitate to drop me a line on...
1
by: mailar | last post by:
Hi , Can some one help me find out the differences between DB2 for LUW and DB2 for z/Series . Also, can someone tel me what considerations do I need to make if I wish to write some SQL UDFs...
9
by: mike | last post by:
Hi all, What do you people do (if anything) to help with automated access-plan checking of static-SQL on DB2 LUW v8.2.2 ? Sometimes after we rebind, DB2 will choose a "bad" plan in certain...
2
by: aj | last post by:
Its not on the DB2 supported environment page, but is anyone running DB2 LUW 8.2 on Red Hat Advanced Server 2.1 (kernel 2.4)? DB2 LUW 8.1 /is/ validated for Red Hat Advanced Server 2.1. On OS...
2
by: RSL101 | last post by:
HI, I am hoping to get your opinions about "Tivoli Monitoring for Databases". Our enterprise environment is AIX/Red Hat Linux, running a lot of IBM P series and E servers. We need to monitor LUW...
3
by: aj | last post by:
DB2 LUW 8.1 fixpak 14 Red Hat EL AS 4.4 I'm trying to diagnose some nocturnal CPU pressure, and am trying to understand the dynamic statement cache as it applies to LUW. The only doc/redbooks...
2
by: F | last post by:
Is DB2 on z/OS same as DB2 on LUW ? Will my DB2 DBA on one environment have to retrain again on the other ? Thanks
1
by: Mark A | last post by:
When upgrading DB2 LUW from 8.2 to 9.1 the following command is issued as part of the upgrade: db2 migrate database <db-name> Does the migrate command make changes to every data and index...
15
by: Christian T | last post by:
Hallo, Is SSL protocol in LUW only supported for IBM DB2 Driver for JDBC and SQLJ type 4 ? I want my NATIVE DB2 client to connect to DB2 server using SSL protocol (not using SQLJ/JDBC) Is...
6
by: Lennart | last post by:
I'm trying to read up on the possibility to migrate a db2 V9.5 server to 64 bit, and continue running 32 bit application servers (via db2 runtime client, or otherwise). Does anyone have links to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.