1 数据库在NOARCHIVELOG模式如何转为ARCHIVELOG模式?
环境:ORACLE9。2
1)修改相应的初始化参数
Oracle10g之前,你还需要修改初始化参数使数据库处于自动归档模式。
在pfile/spfile中设置如下参数:log_archive_start = true。重启数据库此参数生效,
此时数据库处于自动归档模式。
SQL>alter system set log_archive_start=true scope=spfile;
2)设置log_archive_dest_1 参数
alter system set log_archive_dest_1='location=/oracle/oradata/fox/archive_log ' ;
/oracle/oradata/fox/archive_log mandatory'
mandatory表示此归档日志必须成功写入,也可以是optional
3)关闭数据库
SQL> shutdown immediate;
4)加载数据库
SQL> startup mount;
5)数据库置于ARCHIVELOG模式
SQL> alter database archivelog;
Database altered.
6)打开数据库
SQL> alter database open;
Database altered.
7)验证
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/oradata/fox/archive_log
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
注意:完成切换之后立即备份数据库
2 数据库在ARCHIVELOG模式转化为NOARCHIVELOG模式
1)shutdown immediate
2)startup mount
3)alter database noarchivelog
4)alter database open;
注意:完成切换之后立即备份数据库
如何在数据库运行期间动态启动ARCH进程?
SQL> alter system archive log start;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/oradata/fox/archive_log
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
SQL> alter system archive log stop;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Disabled
Archive destination /oracle/oradata/fox/archive_log
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
阅读(6955) | 评论(0) | 转发(0) |