show parameter spfile alter system set log_archive_dest_1='location=/ggs/arch_data' scope=spfile; alter system set db_recovery_file_dest_size=100g scope=spfile sid='*'; alter system set db_recovery_file_dest='/ggs/ora_recovery' scope=spfile; alter system set log_archive_format='arch_%t_%s_%r.arc' scope=spfile;
shutdown immediate; startup mount; alter database archivelog; alter database open ; archive log list;
关闭归档模式: shutdown immediate; startup mount; alter database noarchivelog; alter database open;
查看归档文件: select * from v$log; select * from v$logfile; select * from v$flash_recovery_area_usage; report obsolete; delete obsolete;
备份归档文件: backup archivelog all;
也可以: 先执行alter system switch logfile; 再找到归档日志位置,复制到别的地方即可。 rman target / delete archivelog all completed before 'sysdate-7'; backup first backup format '/tmp/arch-%t_%s_%u' archivelog all delete input; 或者backup database plus archivelog;