Difference between revisions of "Creating a tablespace"
From MyWiki
(Created page with "<source lang="text"> CREATE TABLESPACE <tablespacename> DATAFILE <filename> [SIZE <nn> [K|M]| REUSE] [AUTOEXTEND ON [ NEXT n [K|M]] [MAXSIZE [n [K|M ] |...") |
|||
Line 12: | Line 12: | ||
</source> | </source> | ||
+ | |||
+ | In 9i By default a locally managed tablespace is created.<br> | ||
+ | |||
+ | To create dictionary managed tablespace<br> | ||
+ | CREATE TABLESPACE USERS<br> | ||
+ | DATAFILE '/dbs/database/data1.dbf' size 25M<br> | ||
+ | EXTENT MANAGEMENT DICTIONARY;<br> | ||
+ | |||
+ | You can convert dictionary managed tablespace to locally managed using the <br> | ||
+ | |||
+ | DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL('tablespace_name)<br> | ||
+ | |||
+ | But during database creation if you have created the system tablespace as local, then you will not be able to create a dictionary managed tablespace.<br> |
Latest revision as of 15:28, 19 June 2015
CREATE TABLESPACE <tablespacename> DATAFILE <filename> [SIZE <nn> [K|M]| REUSE] [AUTOEXTEND ON [ NEXT n [K|M]] [MAXSIZE [n [K|M ] | UNLIMITED]] | OFF [ MINIMUM EXTENT integer [K|M] ] [ BLOCKSIZE integer [K] ] [ TEMPORARY | PERMANENT ] [ EXTENT MANAGEMENT [ LOCAL | DICTIONARY ] ] [ LOGGING | NOLOGGING ] [ ONLINE | OFFLINE ] [ SEGMENT SPACE MANAGEMENT [ MANUAL | AUTO ] ];
In 9i By default a locally managed tablespace is created.
To create dictionary managed tablespace
CREATE TABLESPACE USERS
DATAFILE '/dbs/database/data1.dbf' size 25M
EXTENT MANAGEMENT DICTIONARY;
You can convert dictionary managed tablespace to locally managed using the
DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL('tablespace_name)
But during database creation if you have created the system tablespace as local, then you will not be able to create a dictionary managed tablespace.