Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6547863
  • 博文数量: 1005
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13071
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1005)

文章存档

2020年(2)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: Oracle

2012-09-21 10:48:38

环境:
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 --
阅读(3902) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~