alter database backup controlfile to trace as '/home/oracle/control.sql'
create pfile from spfile;

select from v$logfile;
select
from v$log;
alter system switch logfile;
alter system checkpoint;
select open_mode from v$database;
alter database drop logfile group 1;
alter database add logfile group 1 ('/u01/app/oracle/oradata/orcl/ONLINELOG/redo01a.log',
'/u01/app/oracle/oradata/orcl/ONLINELOG/redo01b.log') size 50M;
alter database drop logfile group 2;
alter database add logfile group 2 ('/u01/app/oracle/oradata/orcl/ONLINELOG/redo02a.log',
'/u01/app/oracle/oradata/orcl/ONLINELOG/redo02b.log') size 50M;
alter database drop logfile group 3;
alter database add logfile group 3 ('/u01/app/oracle/oradata/orcl/ONLINELOG/redo03a.log',
'/u01/app/oracle/oradata/orcl/ONLINELOG/redo03b.log') size 50M;

select file#,NAME from v$datafile;
run{
backup as copy datafile 1 format '/u01/app/oracle/oradata/orcl/DATAFILE/SYSTEM_%U.dbf';
backup as copy datafile 3 format '/u01/app/oracle/oradata/orcl/DATAFILE/SYSAUX.dbf';
backup as copy datafile 4 format '/u01/app/oracle/oradata/orcl/DATAFILE/UNDOTBS1.dbf';
backup as copy datafile 5 format '/u01/app/oracle/oradata/orcl/DATAFILE/EXAMPLE.dbf';
backup as copy datafile 6 format '/u01/app/oracle/oradata/orcl/DATAFILE/USERS.dbf';

rman target / switch database to copy;

show parameter control_files;
alter system set control_files='/u01/app/oracle/oradata/orcl/DATAFILE/ORCL/controlfile/o1_mfffys9367.ctl,/u01/app/oracle/oradata/orcl/FRA/ORCL/controlfile/o1_mfffys938c.ctlscope=spfile';
alter system set control_files='/u01/app/oracle/oradata/orcl/DATAFILE/ORCL/controlfile/o1_mfffys9367.ctl';
alter database backup controlfile to trace as '/home/oracle/control.sql';

show parameter db_recovery_file_dest
alter system set db_recovery_file_dest='/u01/app/oracle/oradata/orcl/FRA';
show parameter db_create_file_dest
alter system set db_create_file_dest='/u01/app/oracle/oradata/orcl/DATAFILE/';

@/home/oracle/c1.sql
create pfile='/home/oracle/pfile2.ora' from spfile;
ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA/ORCL/TEMPFILE/temp.269.973904097' REUSE;
select * from dual;
create spfile from pfile='';