denrepo

OracleStorage

Add space: resize or add a datafile

Templates for the three usual fixes. The resize runs as written; the other two are commented out. Change names and sizes, and uncomment the one you want instead if needed.

Changes data

Not yet verified. How scripts are tested

This script changes the database. Check the names and values before you run it.
ora-add-space.sql
1-- Grow an existing file2ALTER DATABASE DATAFILE '/u02/oradata/ORCL/users01.dbf' RESIZE 20G;3 4-- Or add a new file (file system)5-- ALTER TABLESPACE users ADD DATAFILE '/u02/oradata/ORCL/users02.dbf'6--   SIZE 10G AUTOEXTEND ON NEXT 1G MAXSIZE 32G;7 8-- Or add a new file (ASM or Oracle Managed Files)9-- ALTER TABLESPACE users ADD DATAFILE SIZE 10G AUTOEXTEND ON NEXT 1G MAXSIZE 32G;

Save it as ora-add-space.sql and run it with SQL> @ora-add-space.

Open in denrepoRelated tool: Tablespace runway and datafiles

Helps with

More Oracle scripts: Storage