查看控制文件的位置
show parameter control_fi
创建控制文件的目录
mkdir -p /u02/controlfile/cdb1/
mkdir -p /u03/controlfile/cdb1/
mkdir -p /u04/controlfile/cdb1/
chown -R oracle:oinstall /u02
chown -R oracle:oinstall /u03
chown -R oracle:oinstall /u04
chmod -R 775 /u02
chmod -R 775 /u03
chmod -R 775 /u04
ls -ld /u02/controlfile/cdb1/
ls -ld /u03/controlfile/cdb1/
ls -ld /u04/controlfile/cdb1/
alter system set control_files=’/u01/app/oracle/oradata/cdb1/control01.ctl’,
‘/u01/app/oracle/fast_recovery_area/cdb1/control02.ctl’,
‘/u02/controlfile/cdb1/control03.ctl’,
‘/u03/controlfile/cdb1/control04.ctl’,
‘/u04/controlfile/cdb1/control05.ctl’ scope=spfile;
关闭数据库
shutdown immediate;
切换用户
把控制文件复制到新的地方
cp /u01/app/oracle/oradata/cdb1/control01.ctl /u02/controlfile/cdb1/control03.ctl
cp /u01/app/oracle/oradata/cdb1/control01.ctl /u03/controlfile/cdb1/control04.ctl
cp /u01/app/oracle/oradata/cdb1/control01.ctl /u04/controlfile/cdb1/control05.ctl
ll /u02/controlfile/cdb1/control03.ctl
启动数据库
show parameter control_fi
增加日志到不同位置
主要查看日志大小和日志组和有几个日志成员
select group#,members,bytes,bytes/1024/1024 daxiao from v$log;
创建新日志的位置
mkdir -p /u02/redolog/cdb1/
ALTER DATABASE ADD LOGFILE MEMBER ‘/u02/redolog/cdb1/redo0102.log’ TO GROUP 1
增加好的日志成员
select * from vlog,vlogfile
where vKaTeX parse error: Expected 'EOF', got '#' at position 10: log.group#̲=vlogfile.group#;