Home > Database > Mysql Tutorial > oracle 如何关闭打开归档日志

oracle 如何关闭打开归档日志

WBOY
Release: 2016-06-07 17:55:52
Original
1332 people have browsed it

本文将介绍oracle 归档日志的关闭打开方法,需要了解的朋友可以参考下

查看oracle数据库是否为归档模式
SQL> select name,log_mode from V$database;

NAME LOG_MODE
------------------ ------------------------
TEST NOARCHIVELOG

SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 80157
Current log sequence 80163

编辑本段配置数据库的归档模式
1.改变非归档模式到归档模式:   
1)SQL> conn / as sysdba (以DBA身份连接数据库)   
2)SQL> shutdown immediate;(立即关闭数据库)   
3)SQL> startup mount (启动实例并加载数据库,但不打开)   
4)SQL> alter database archivelog; (更改数据库为归档模式)   
5)SQL> alter database open; (打开数据库)   
6)SQL> alter system archive log start; (启用自动归档)   
7)SQL> exit (退出)   

做一次完全备份,因为非归档日志模式下产生的备份日志对于归档模式已经不可用了.这一步非非常重要!
2.改变归档模式到非归档模式:   
1)SQL>SHUTDOWN NORMAL/IMMEDIATE;   
2)SQL>STARTUP MOUNT;   
3)SQL>ALTER DATABASE NOARCHIVELOG;   
4)SQL>ALTER DATABASE OPEN;
3.归档相关命令
archive log stop;
archive log start;
archive log list;

show parameters;
show parameters log_archive_start;
show parameters log_archive_max_process; #归档进程数
alter system set log_archive_max_process=5; #将归档进程数改为5
select * from v$bgprocess; #检察后台进程
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template