Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1994155
  • 博文数量: 176
  • 博客积分: 1857
  • 博客等级: 上尉
  • 技术积分: 2729
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-14 22:55
个人简介

吾生有涯,而知无涯,适当止学.循序渐进,步步提升 Talk is cheap, show me the code.

文章分类

全部博文(176)

文章存档

2019年(1)

2018年(14)

2017年(20)

2016年(31)

2015年(15)

2014年(5)

2013年(10)

2012年(80)

分类: Oracle

2012-11-29 11:05:18

一:以归档模式运行数据库

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