How to specify the tablespaces when create DB2 table in DS

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ibillow
Participant
Posts: 5
Joined: Mon Mar 31, 2008 4:36 am

How to specify the tablespaces when create DB2 table in DS

Post by ibillow »

I am using DB2 Enterprise stage to create tables in the DB2 9.1 partitioning db. It seems it use the default tablespaces by default and no other option.

Is there any way to specify the tablespaces use when creating tables by DB2 Enterprise stage ?

Thanks in advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well... that *is* what the 'default tablespaces' are for, to be used by default when none are specified. :wink:

I'm not familiar with the gory details of the DB2 stage, but whatever normal syntax you'd use for this should be perfectly valid there as well. I would assume there's some kind of 'user-defined' or 'custom' option available for this.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ibillow
Participant
Posts: 5
Joined: Mon Mar 31, 2008 4:36 am

Post by ibillow »

I also assume there's some kind of custom option available in DataStage .

But I couldn't find anyway to specify the tablespaces when create DB2 tables through using DB2 Enterprise Stage.

Anyone knows how to specify that ?
Thanks.

chulett wrote:Well... that *is* what the 'default tablespaces' are for, to be used by default when none are specified. :wink:

I'm not familiar with the gory details of the DB2 stage, but whatever normal syntax you'd use for this should be perfectly valid there as well. I would assume there's some kind of 'user-defined' or 'custom' option available for this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Only if you can edit the generated DDL. I prefer to copy the generated DDL from DataStage, paste it into a suitable tool (like DB2 Control Center or TOAD for DB2), and amend it there for any requirements I have - tablespaces, indexes, named constraints, and so on).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ibillow
Participant
Posts: 5
Joined: Mon Mar 31, 2008 4:36 am

Post by ibillow »

I understand I could create the table by using DDL to specify the tablespaces.
But just wondering whether DataStage can specify tablespaces also. (it makes the process simpler :P
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It does not.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ibillow
Participant
Posts: 5
Joined: Mon Mar 31, 2008 4:36 am

Post by ibillow »

Too bad... :(
Thanks Ray...
btw... anyway to change the default tablespace DS is using ? :roll:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not in DataStage. But you can change the default tablespace that the DB2 user is using within DB2.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
stefanfrost1
Premium Member
Premium Member
Posts: 99
Joined: Mon Sep 03, 2007 7:49 am
Location: Stockholm, Sweden

Post by stefanfrost1 »

In the DB-enterprise stage using for example MODE = Write Create, you get a option called DB Options within which you can specify tabelspace amongst other (however missing a whole lot of options available in regular DDL)
Type: String
Specify an optional table space or partitioning keys to be used by DB2 to create a table. You can specify this option only when Write Mode is set to Create or Replace. By default, the table is created in all processing nodes in the default table space and uses the first column in the table, corresponding to the first input column on the input link, as the partitioning key. You specify arguments as a string enclosed in braces in the form: {tablespace=<t_space>,[key=<col0>,...]}, i.e. This string can contain a single tablespace argument, and multiple key arguments
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
ibillow
Participant
Posts: 5
Joined: Mon Mar 31, 2008 4:36 am

Post by ibillow »

Great ! it works !
I put
tablespace="<tblspace>"
in the db option... it works.

Thanks stefanfrost1 !
stefanfrost1 wrote:In the DB-enterprise stage using for example MODE = Write Create, you get a option called DB Options within which you can specify tabelspace amongst other (however missing a whole lot of options available in regular DDL)
Type: String
Specify an optional table space or partitioning keys to be used by DB2 to create a table. You can specify this option only when Write Mode is set to Create or Replace. By default, the table is created in all processing nodes in the default table space and uses the first column in the table, corresponding to the first input column on the input link, as the partitioning key. You specify arguments as a string enclosed in braces in the form: {tablespace=<t_space>,[key=<col0>,...]}, i.e. This string can contain a single tablespace argument, and multiple key arguments
Post Reply