环境:
OS:Red Hat Linux As 5
DB:11.2.0.1(ASM)
1.备份参数文件
create pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/pfilebak2012092001' from spfile;
2.指定归档目的
SQL> alter system set log_archive_dest_1 = 'location=+RECDATA' scope=spfile;
System altered.
3.关掉数据库启动到mount状态
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 338968576 bytes
Fixed Size 1336400 bytes
Variable Size 276827056 bytes
Database Buffers 54525952 bytes
Redo Buffers 6279168 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
4.查看归档
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +RECDATA
Oldest online log sequence 0
Next log sequence to archive 15
Current log sequence 15
5.查看归档日志
SQL> alter system switch logfile;
System altered.
SQL> Select recid,Name From v$archived_log;
RECID NAME
------------------------------------------------------------------------
1 +RECDATA/oracl/archivelog/2012_09_21/thread_1_seq_15.262.794549949
-- The End --
阅读(3955) | 评论(0) | 转发(0) |