Ajouter un nouveau tablespace
OracleStockageCommande
-- File system:
CREATE TABLESPACE customer_data
DATAFILE '/u01/oradata/ORCL/customer_data01.dbf'
SIZE 1G AUTOEXTEND ON NEXT 256M MAXSIZE 20G
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
-- If you use ASM:
CREATE TABLESPACE customer_data
DATAFILE '+DATA' SIZE 1G AUTOEXTEND ON NEXT 256M MAXSIZE 20G;Ce que fait la commande
Crée un nouveau tablespace permanent dans lequel placer des segments de tables/index.
Quand l'utiliser
Lors de l'allocation d'un stockage distinct pour une nouvelle application/un nouveau schéma.
Attention
Indiquez MAXSIZE, sinon le disque peut se remplir. Dans ASM, le nom de fichier est généré automatiquement.