查看归档模式:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /OraLog/arch
Oldest online log sequence
Next log sequence to archive
Current log sequence
修改oracle日志模式(是否归档)
1. 关闭数据库:shutdown immediate;
2. 启动数据库实例到mount状态:startup mount;
3. 切换数据库日志模式:
alter database archivelog;(设置数据库为归档日志模式)
alter database noarchivelog;(设置数据库为非归档日志模式)
4. 打开数据库:alter database open;
5. 确认数据库处于归档模式:archive log list;
查看asm空间:
select name,total_mb,free_mb from v$asm_diskgroup_stat;
NAME TOTAL_MB FREE_MB
------------------------------ ---------- ----------
ARCHDG
DATADG
rman
connect target /
crosscheck archivelog all;
delete expired archivelog all;
delete archivelog all completed before 'sysdate - 4';
删除归档日志脚本:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=dyjldb1
export ORACLE_HOME=$ORACLE_BASE/product/10.2./db_1 $ORACLE_HOME/bin/rman log=/home/oracle/rman.log <<EOF
connect target /
run {
delete noprompt archivelog all completed before 'sysdate - 4';
}
exit;
EOF
Oracle查询被锁死:
https://www.cnblogs.com/SweetMemory/p/6289980.html