1、查看oralce是归档模式还是非归档模式
SQL> select name,log_mode from v$database;
NAME LOG_MODE
---------------------------------------- ------------------------------------
YOON ARCHIVELOG
SQL> select name,log_mode from v$database;
NAME LOG_MODE
---------------------------------------- ------------------------------------
YOON ARCHIVELOG
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 326
Next log sequence to archive 328
Current log sequence 328
2、查看归档存放路径
SQL> show parameter db_recovery;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
db_recovery_file_dest string /u01/oracle/fast_recovery_area
db_recovery_file_dest_size big integer 4122M
3、修改归档路径大小
SQL> alter system set db_recovery_file_dest_size=5G;
4、查看归档路径
SQL> select name,SPACE_LIMIT,SPACE_USED from v$recovery_file_dest;
NAME SPACE_LIMIT SPACE_USED
---------------------------------------- ----------- ----------
/u01/oracle/fast_recovery_area 5368709120 2539942912
5、修改归档路径
SQL> alter system set db_recovery_file_dest='/u01/archivelog';
6、删除归档日志
①查看归档路径状态
②到系统目录下删除归档日志
③crosscheck archivelog all;
④delete expired archivelog all;
7、删除7天前
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';
8、7天前到现在
DELETE ARCHIVELOG FROM TIME 'SYSDATE-7';
9、修改归档格式
修改归档格式alter system set log_archive_format = "archive_%t_%s_%r.log" scope=spfile;
还可以设置一个参数alter system set log_archive_max_processes = 2; //操作系统为oracle归档开启多少个归档进程;重新启动数据库。
SQL> alter system set log_archive_dest_1='location=/u01/archivelog' scope =both;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28939273/viewspace-1061506/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28939273/viewspace-1061506/