Oracle RAC启用归档

Oracle RAC启用归档

grid用户

执行如下命令

1
2
3
4
5
6
asmcmd
cd DATA
mkdir arch
cd arch
mkdir lotdb1
mkdir lotdb2

归档路径如下

1
2
+DATA/arch/lotdb1
+DATA/arch/lotdb2

oracle用户

执行如下

1
2
3
4
sqlplus / as sysdba
alter system set log_archive_format='%t_%s_%r.arch' scope=spfile sid='*';
alter system set log_archive_dest_1='location=+DATA/arch/lotdb1' scope=spfile sid='lotdb1';
alter system set log_archive_dest_1='location=+DATA/arch/lotdb2' scope=spfile sid='lotdb2';

停止数据库 lotdb是 server name

1
srvctl stop database -d lotdb

启动Oracle数据库(另外的一个节点直接startup即可)

1
2
3
4
startup mount;
alter database archivelog;
alter database open;
archive log list;

切换日志在相应的目录查看
alter system archive log current;

坚持原创技术分享,您的支持将鼓励我继续创作!