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 |
create tablespace user_tbs |
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 |
- |
- |
TEMPORARY TABLESPACE
EXAMPLE
ORACLE |
ALTIBASE |
---|---|
create bigfile temporary tablespace user_temp |
create temporary tablespace user_temp |
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. |
EXAMPLE
ORACLE |
ALTIBASE |
---|---|
ALTER TABLESPACE USER_TEMP |
ALTER TABLESPACE USER_TEMP |
ALTER TABLESPACE USER_TEMP |
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 |
DROP TABLESPACE USER_TEMP |