alter database datafile maxsize 32g 1

alter database datafile maxsize 32g

SELECT * FROM DBA_DATA_FILES;

ALTER TABLESPACE my_tbs ADD DATAFILE '/path/to/my_file.dbf' 
	SIZE 100M AUTOEXTEND OFF;
-- Autoextend with max size:
ALTER TABLESPACE my_tbs ADD DATAFILE '/path/to/my_file.dbf' 
	SIZE 10G AUTOEXTEND ON NEXT 1G MAXSIZE 32G;    
-- For TEMP tablespaces:
ALTER TABLESPACE my_tbs ADD TEMPFILE '/path/to/my_file.dbf' 
	SIZE 100M AUTOEXTEND OFF;

Here is what the above code is Doing:
1. We’re creating a tablespace called my_tbs.
2. We’re creating a datafile called my_file.dbf in the /path/to/ directory.
3. We’re setting the initial size of the datafile to 100M.
4. We’re setting the autoextend option to off.
5. We’re adding the datafile to the my_tbs tablespace.

Similar Posts