SQL> select name from v$controlfile SQL> select name from v$controlfile;
NAME --------------------------------------------------------- +DATA/susu/controlfile/current.261.1029148979 +DATA/susu/controlfile/current.260.1029148979
SQL> show parameter control_files;
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string +DATA/susu/controlfile/current .261.1029148979, +DATA/susu/co ntrolfile/current.260.10291489 79
SQL>select name,value from v$parameterwhere name='control_files'; SQL> select name,value from v$parameterwhere name='control_files';
NAME --------------------------------------------------------- VALUE --------------------------------------------------------- control_files +DATA/susu/controlfile/current.261.1029148979, +DATA/susu/controlfile/current.260.1029148979
# 查看控制文件记录的内容 select * from v$controlfile_record_section;
查看控制文件的内容
1 2 3 4 5 6 7 8 9
SQL> alter session set events 'immediate trace name controlf level 8';
Session altered.
SQL> select value from v$diag_infowhere name='Default Trace File';
VALUE --------------------------- /oracle/app/oracle/diag/rdbms/orcl/ORCL/trace/ORCL_ora_8575.trc
增加控制文件
1 2 3 4 5 6 7 8 9 10
SQL>alter system set control_files='/opt/oracle/data/orcl/control01.ctl','/opt/oracle/data/orcl/contorl02.ctl' scope=spfile
如果出现control file版本不一致的情况,那么把版本高的拷贝给版本低的
再执行:
SQL>alter database mount;
SQL>alter database open;
备份控制文件
1 2 3 4 5 6 7 8 9 10
# 归档模式下 alter database backup controlfile to '/opt/oracle/data/orcl/control2013.bak';
# 任何模式下 alter databae backup controlfile to trace as ''; alter database backup controlfile to trace as '/oracle/app/control180116.ora';
# rman备份 backup current controlfile; backup database include current controlfile;
Maybe you could buy me a cup of coffee.
Scan this qrcode
Open alipay app scan this qrcode, buy me a coffee!
Scan this qrcode
Open wechat app scan this qrcode, buy me a coffee!