[oracle@node0 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 8 11:23:18 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 499125840 bytes
Database Buffers 343932928 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
SQL> archive log list; //归档日志没有开启
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Current log sequence 4
SQL> shutdown immediate; 首先关闭数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount; 启动到mount状态
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 499125840 bytes
Database Buffers 343932928 bytes
Redo Buffers 5132288 bytes
Database mounted.
SQL> alter database archivelog; 开启归档
Database altered.
SQL> archive log list; 已经开启
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/archive'; 设置归档路径
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/archive
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/archive
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
SQL> alter system switch logfile;
System altered.
SQL> alter system checkpoint;
System altered.
阅读(1579) | 评论(0) | 转发(0) |