Skip to end of metadata
Go to start of metadata

CREATE TABLESPACE

ALTIBASE HDB has two types of tablespace. 

Those are Memory tablespace and Disk tablespace.

Oracle's tablespace is disk tablespace.

Therefore, When converting oracle to altibase, user specifies statement like "CREATE [ DISK ] [ DATA ] TABLESPACE".

The majority of ALTIBASE HDB syntax are similar to the Oracle syntax.

And ALTIBASE HDB syntax is more simple than Oracle's one.

First, we explain example of converting tablespace statement and then explain considerations about tablespace.

DATA TABLESPACE

Example

ORACLE

ALTIBASE HDB

create bigfile tablespace user_tbs
minimum extent 128k
datafile '/dbs/user_tbs_01.dbf'
blocksize 8k
logging
force logging
online
extent management local autoallocate
segment space management auto
flashback off;

create tablespace user_tbs
datafile '/dbs/user_tbs_01.dbf'
size 64M autoextend on next 64M maxsize 1024M
segment management auto;

ALTIBASEHDB does not support red syntax above. If you create new tablespace, you should not use this red syntax.

We describe ALTIBASE HDB syntax  as compared with Oracle as below.

ORACLE

ALTIBASE HDB

Comments

BIGFILE | SMALLFILE

-

-

DATAFILE

DATAFILE

-

MINIMUM EXTENT

-

-

BLOCKSIZE

-

-

LOGGING

-

-

FORCE LOGGING

-

-

DEFAULT storage

-

-

ONLINE | OFFLINE

-

-

EXTENT MANAGEMENT LOCAL

-

-

SEGMENT SPACE MANAGEMENT AUTO | MANUAL

SEGMENT MANAGEMENT AUTO | MANUAL

-

FLASHBACK ON | OFF

-

-

Icon

SEGMENT MANAGEMENT MANUAL
convert SEGMENT phase to SEGMENT MANAGEMENT AUTO | MANUAL and other phase is not supported

TEMPORARY TABLESPACE

EXAMPLE

ORACLE

ALTIBASE

create bigfile temporary tablespace user_temp
tempfile '/dbs/temp_001.dbf'
size 128m
autoextend on next 128m maxsize 1024m
tablespace group tmp_grp
extent management local;

create temporary tablespace user_temp
tempfile '/dbs/temp_001.dbf'
size 128m
autoextend on next 128m
maxsize 1024m;

ALTIBAES HDB does not support red syntax above. If you create new temporary tablespace, you should avoid this red syntax.

We compare ALTIBASE HDB syntax with Oracle's as below.

ORACLE

ALTIBASE

Comments

BIGFILE | SMALLFILE

-

-

TABLESPACE GROUP

-


EXTENT MANAGEMENT LOCAL | DICTIONARY

-

-

UNDO TABLESPACE

In Altibase, user can not create or drop undo tablespace. 

In the process of creating database, various system tablespaces, including the dictionary tablespace, the undo tablespace,

and temporary tablespaces are created.

A user only can modify the size of it by using "ALTER TABLESPACE" statement as shown below.

User can use "SYS_TBS_DISK_UNDO" TABLESPACE only .


ALTER TABLESPACE

By specifying "ALTER TABLESPACE" statement, resizing and renaming datafile, adding and dropping datafile,

modifying the definition of tablespace and status of tablespace, backing up tablespaces are available in Altibase.

But renaming tablespace is not possible in altibase.

The functionality of Altibase and Oracle is similar as described above in "CREATE TABLESPACE" statement.

Further desription of the differences between ORACLE and ALTIBASE HDB is as follows using "ALTER TABLESPACE" statement.

ORACLE

ALTIBASE

Comments

READ(ONLY|WRITE)

-

-

COALESCE

-

-

RETENTION(GUARANTEE|NOGRUARANTEE)

-

-

ONLINE|OFFLINE(NORMAL|TEMPORARY|IMMEDIATE)

ONLINE|OFFLINE|DISCARD

Similar(At the control phase, discard option can be used.
This can't be brought back online.
Due to Inconsistent tablespace, Altibase can't startup.
In that case, discard option is available)


EXAMPLE

ORACLE

ALTIBASE

ALTER TABLESPACE USER_TEMP
ADD TEMPFILE 'USER_TEMP01.dbf'
SIZE 100M AUTOEXTEND OFF;

ALTER TABLESPACE USER_TEMP
ADD TEMPFILE 'USER_TEMP01.dbf'
SIZE 100M AUTOEXTEND OFF;

ALTER TABLESPACE USER_TEMP
OFFLINE NORMAL;

ALTER TABLESPACE USER_TEMP OFFLINE;

DROP TABLESPACE

The statement of Altibase and Oracle is completely same in use.

EXAMPLE

ORACLE

ALTIBASE

DROP TABLESPACE USER_TEMP
INCLUDING DATAFILES AND CONTENTS
CASCADE CONSTRAINTS;

DROP TABLESPACE USER_TEMP
INCLUDING DATAFILES AND CONTENTS
CASCADE CONSTRAINTS;

  • No labels