sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Nanchil's Avatar

COLLATE USING IDENTITY


Question posted by: Nanchil (Guest) on November 12th, 2005 06:25 AM
Hi,
We created a database (DB2 UDB 7.2 on solaris 8) without this
(COLLATE USING IDENTITY ) option. But we need this now for binary
sorting. The database is siebel database. Is it possible to drop and
recreate the database with COLLATE USING IDENTITY option and restore
the database. Please advise.

Nanchil.
4 Answers Posted
Blair Adamache's Avatar
Guest - n/a Posts
#2: Re: COLLATE USING IDENTITY

If the database was created in Unicode, backup/restore should work.

If the database was not created in unicode, you'll need to export the
data using a tool like db2move, capture other objects (triggers etc)
using db2look -e, and then recreate those objects, and load or import
the tables in the newly created database.

Nanchil wrote:
[color=blue]
> Hi,
> We created a database (DB2 UDB 7.2 on solaris 8) without this
> (COLLATE USING IDENTITY ) option. But we need this now for binary
> sorting. The database is siebel database. Is it possible to drop and
> recreate the database with COLLATE USING IDENTITY option and restore
> the database. Please advise.
>
> Nanchil.[/color]

Ken's Avatar
Guest - n/a Posts
#3: Re: COLLATE USING IDENTITY

We did this by unloading the databases using db2move, dropping the
database, recreate the database with the collate using identity and
then reloading with db2move:

1 - run db2look
2 - export database using db2move
3 - unload the db configuration (get db configuration for x)
4 - drop tablespaces (one database left tags in the raw devices)
5 - drop db (I had to remove some "lost+found" directories and
uncatalog one of the databases)
6 - create db with collate using identity (same name as was dropped)
7 - update db configuration
8 - backup the db
9 - ran sql from db2 look to create tables (probably not necessary)
10 - backup the db
11 - use db2load to load the db
12 - run stats
13 - create procedures
14 - create new packages (we had the dbrm's in a directory)
15 - update user and group permissions for tables...
16 - set integrities on constraints
17 - rebind QMF
18 - rebind CLI/ODBC with Client Configuration Assistant
19 - verify connections
20 - backup db

I think we tried doing it with a backup and restore and the collating
sequence was not what we want when we were done with the restore so we
went with the unload and reload. We were lucky it got caught before
we were in production.

Ken

Join Bytes! (Nanchil) wrote in message news:<6c2873a.0402020805.56dd2450@posting.google.com>...[color=blue]
> Hi,
> We created a database (DB2 UDB 7.2 on solaris 8) without this
> (COLLATE USING IDENTITY ) option. But we need this now for binary
> sorting. The database is siebel database. Is it possible to drop and
> recreate the database with COLLATE USING IDENTITY option and restore
> the database. Please advise.
>
> Nanchil.[/color]
Nanchil's Avatar
Guest - n/a Posts
#4: Re: COLLATE USING IDENTITY

Hi All,
Thanks for your responses. I think we have to do the export and
import the database. Thanks for your help.

Nanchil.

Join Bytes! (Ken) wrote in message news:<74c57006.0402021549.29cb77cd@posting.google.com>...[color=blue]
> We did this by unloading the databases using db2move, dropping the
> database, recreate the database with the collate using identity and
> then reloading with db2move:
>
> 1 - run db2look
> 2 - export database using db2move
> 3 - unload the db configuration (get db configuration for x)
> 4 - drop tablespaces (one database left tags in the raw devices)
> 5 - drop db (I had to remove some "lost+found" directories and
> uncatalog one of the databases)
> 6 - create db with collate using identity (same name as was dropped)
> 7 - update db configuration
> 8 - backup the db
> 9 - ran sql from db2 look to create tables (probably not necessary)
> 10 - backup the db
> 11 - use db2load to load the db
> 12 - run stats
> 13 - create procedures
> 14 - create new packages (we had the dbrm's in a directory)
> 15 - update user and group permissions for tables...
> 16 - set integrities on constraints
> 17 - rebind QMF
> 18 - rebind CLI/ODBC with Client Configuration Assistant
> 19 - verify connections
> 20 - backup db
>
> I think we tried doing it with a backup and restore and the collating
> sequence was not what we want when we were done with the restore so we
> went with the unload and reload. We were lucky it got caught before
> we were in production.
>
> Ken
>
> Join Bytes! (Nanchil) wrote in message news:<6c2873a.0402020805.56dd2450@posting.google.com>...[color=green]
> > Hi,
> > We created a database (DB2 UDB 7.2 on solaris 8) without this
> > (COLLATE USING IDENTITY ) option. But we need this now for binary
> > sorting. The database is siebel database. Is it possible to drop and
> > recreate the database with COLLATE USING IDENTITY option and restore
> > the database. Please advise.
> >
> > Nanchil.[/color][/color]
Sherman Lau's Avatar
Guest - n/a Posts
#5: Re: COLLATE USING IDENTITY

Nanchil,

What is the codepage or codeset of your database? If your database is UTF-8
or 1208, the default collation is binary already.

Sherman

"Nanchil" <nanchil@hotmail.com> wrote in message
news:6c2873a.0402031050.61d92fb3@posting.google.co m...[color=blue]
> Hi All,
> Thanks for your responses. I think we have to do the export and
> import the database. Thanks for your help.
>
> Nanchil.
>
> Join Bytes! (Ken) wrote in message[/color]
news:<74c57006.0402021549.29cb77cd@posting.google.com>...[color=blue][color=green]
> > We did this by unloading the databases using db2move, dropping the
> > database, recreate the database with the collate using identity and
> > then reloading with db2move:
> >
> > 1 - run db2look
> > 2 - export database using db2move
> > 3 - unload the db configuration (get db configuration for x)
> > 4 - drop tablespaces (one database left tags in the raw devices)
> > 5 - drop db (I had to remove some "lost+found" directories and
> > uncatalog one of the databases)
> > 6 - create db with collate using identity (same name as was dropped)
> > 7 - update db configuration
> > 8 - backup the db
> > 9 - ran sql from db2 look to create tables (probably not necessary)
> > 10 - backup the db
> > 11 - use db2load to load the db
> > 12 - run stats
> > 13 - create procedures
> > 14 - create new packages (we had the dbrm's in a directory)
> > 15 - update user and group permissions for tables...
> > 16 - set integrities on constraints
> > 17 - rebind QMF
> > 18 - rebind CLI/ODBC with Client Configuration Assistant
> > 19 - verify connections
> > 20 - backup db
> >
> > I think we tried doing it with a backup and restore and the collating
> > sequence was not what we want when we were done with the restore so we
> > went with the unload and reload. We were lucky it got caught before
> > we were in production.
> >
> > Ken
> >
> > Join Bytes! (Nanchil) wrote in message[/color][/color]
news:<6c2873a.0402020805.56dd2450@posting.google.com>...[color=blue][color=green][color=darkred]
> > > Hi,
> > > We created a database (DB2 UDB 7.2 on solaris 8) without this
> > > (COLLATE USING IDENTITY ) option. But we need this now for binary
> > > sorting. The database is siebel database. Is it possible to drop and
> > > recreate the database with COLLATE USING IDENTITY option and restore
> > > the database. Please advise.
> > >
> > > Nanchil.[/color][/color][/color]


 
Not the answer you were looking for? Post your question . . .
196,828 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,828 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors