Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

change default table space in db2

1,229 views
Skip to first unread message

Charles

unread,
Jun 15, 2001, 10:55:52 AM6/15/01
to
if i create a table without tablespace in database , the db2 will create the
table within default table spaces "USERSPACE1"

how can i change the default table space to other without drop the
"USERSPACE1" ??


Thomas Wiedmann

unread,
Jun 15, 2001, 12:02:26 PM6/15/01
to
Hi Charles,

CREATE TABLE test (
[...]
) IN mytablespace;


Regards,
Thomas

Thomas Wiedmann

unread,
Jun 15, 2001, 12:09:44 PM6/15/01
to
Hi Charles,

sorry, I did'nt read your question
exactly..

Regards,
Thomas


>
> >
> > if i create a table without tablespace in database , the db2 will create the
> > table within default table spaces "USERSPACE1"
> >
> > how can i change the default table space to other without drop the
> > "USERSPACE1" ??

--
Danke!
Thomas Wiedmann

-----------------------------------------------
Toolbox, die Zeitschrift für Softwareentwickler
http://www.toolbox-mag.de

Knut Stolze

unread,
Jun 15, 2001, 11:25:27 AM6/15/01
to

Have a look at the CREATE TABLE statement in the SQL Reference. There is the
algorithm on how DB2 decides which tablespace a newly created table will go
in.

--
Knut Stolze
DB2 UDB Spatial Extender
IBM Silicon Valley Lab

db2user

unread,
Jun 15, 2001, 2:33:18 PM6/15/01
to
Charles,

If you create another table space just like USERSPACE1, the next
"create table" statement without table space specified will use the new
table space.

The following is the order of tablespaces to be used if you don't specify
tablepace in "create table" statement:

1. table space IBMDEFAULTGROUP with sufficient page size;
2. user created table spaces of the smallest pagesize that is sufficient for this table;
3. USERSPACE1 with sufficient page size

HTH,

db2user2001


"Charles" <and...@ms1.url.com.tw> wrote in message news:<9gd7fl$6...@netnews.hinet.net>...

Charles

unread,
Jun 17, 2001, 11:50:37 AM6/17/01
to
sorry....
my question is........
suppose i have created a table spaces ( "TABSPACE1")
I want to creat a table ,but i don't specify tablespace in "creat table"
statement
can i change the default tablespace "USERSPACE1" to "TABSPACE1" ???
then i create any table and the table will be in tablespace "TABSPACE1"
thank you very much.......

"Charles" <and...@ms1.url.com.tw> 撰寫於郵件
news:9gd7fl$6...@netnews.hinet.net...

Gert van der Kooij

unread,
Jun 17, 2001, 12:06:16 PM6/17/01
to
In article <9giji8$n...@netnews.hinet.net>, and...@ms1.url.com.tw
says...
Hi,
You can use the 'REVOKE USE OF TABLESPACE USERSPACE1 FROM PUBLIC ' to
do this.
0 new messages