Chinaunix首页 | 论坛 | 博客
  • 博客访问: 654975
  • 博文数量: 70
  • 博客积分: 145
  • 博客等级: 入伍新兵
  • 技术积分: 1150
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-11 08:15
个人简介

没有简介就是最好的简介

文章分类

全部博文(70)

文章存档

2020年(1)

2018年(2)

2017年(3)

2016年(11)

2015年(12)

2014年(16)

2013年(19)

2012年(6)

我的朋友

分类: Oracle

2014-07-08 15:26:25

[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) |
给主人留下些什么吧!~~