Wednesday, February 24, 2021


Add /modify Datafile in ASM


https://orahow.com/add-datafile-in-oracle/

http://www.oracle-wiki.net/startdocsusefuloraclecommands

-------------------------------------------------------------

Query to Check File_name, initial size and maxsize

---------------------------------------------------

select FILE_NAME,FILE_ID,AUTOEXTENSIBLE,bytes/1024/1024/1024,STATUS,MAXBYTES/1024/1024/1024 from dba_data_files
where TABLESPACE_NAME='&TABLESPACE_NAME';



To check the location of existing datafiles
================================

SQL> show parameter db_create_file_dest;

SQL> select file_name from dba_data_files;

SQL> select file_name,bytes/1024/1024 mb
           from dba_data_files
           where tablespace_name like 'SYSTEM%'
           order by file_name;


------------------------------------------------------------------------------------------------------------------

Add Datafile
=============

ALTER TABLESPACE TABLESPACE_NAME ADD DATAFILE '+DATA' SIZE 16M AUTOEXTEND ON MAXSIZE 31G;

---------------------------------------------------------------------------------------------------------------

To enable datafile autoextend and set the Maxsize
======================================

ALTER DATABASE datafile '+DATA/SSLCDB/AF17DB97F89A0156E053AC1002963695/DATAFILE/system.301.1050883993' autoextend ON maxsize 31G;

----------------------------------------------------------------------------------------------------------------

Resize Datafiles
=============

alter database datafile '+DATA/SSLCDB/AF17DB97F89A0156E053AC1002963695/DATAFILE/system.301.1050883993' resize 20G;






No comments:

Post a Comment

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...