IBM DB2 9.7 determining default tablespace -


i have db2 9.7 database. have defined specific tablespace, tables go userspace1.

now have created 2 new tablespaces , assign 2 tables each of 2 new tablespaces in clause. however, other tables go 1 of 2 new tablespaces too, though have not specified rest of tables!

how can rest of tables go previous userspace1 tablespace, without explicitly defining each table? thanks.

when no tablespace clause indicated, db2 choose tablespace according next algorithm:

if clause not specified, database manager chooses table space (from set of existing table spaces in database) smallest sufficient page size , row size within row size limit of page size on authorization id of statement has use privilege.

if more 1 table space qualifies, choose table space in following order of preference, depending how authorization id of statement granted use privilege on table space:

1. authorization id 2. role authorization id granted 3. group authorization id belongs 4. role group authorization id belongs granted 5. public 6. role public granted 

if more 1 table space still qualifies, final choice made database manager.

table space determination can change if:

table spaces dropped or created use privileges granted or revoked 

http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0000927.html

as can see, depending on many parameters tablespace userspace1 or not selected. best indicate tablespace, or not allow create tables in other tablespaces.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -