一:以归档模式运行数据库
1.shutdown immediate关闭数据库
[oracle@oracle-n1 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 7 11:30:42 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> shutdown immediate;
2.启动数据库到mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 1185853440 bytes
Fixed Size 2212776 bytes
Variable Size 520096856 bytes
Database Buffers 654311424 bytes
Redo Buffers 9232384 bytes
Database mounted.
SQL>
3.启用或停止归档模式
开启归档模式
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/ora11g/product/11.2.0/db_1/dbs/arch
Oldest online log sequence 97
Next log sequence to archive 99
Current log sequence 99
关闭归档模式
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1185853440 bytes
Fixed Size 2212776 bytes
Variable Size 520096856 bytes
Database Buffers 654311424 bytes
Redo Buffers 9232384 bytes
Database mounted.
SQL> alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /data/ora11g/product/11.2.0/db_1/dbs/arch
Oldest online log sequence 97
Current log sequence 99
阅读(2861) | 评论(0) | 转发(0) |