Chinaunix首页 | 论坛 | 博客
  • 博客访问: 27380
  • 博文数量: 7
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 122
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-15 11:17
文章分类

全部博文(7)

文章存档

2014年(7)

我的朋友

分类: Oracle

2014-03-18 14:54:40

查看当前状态
[oracle@test ~]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 17 22:35:33 2014


Copyright (c) 1982, 2005, Oracle.  All rights reserved.




Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options


SQL> archive log list
Database log mode       No Archive Mode
Automatic archival       Disabled
Archive destination       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     0
Current log sequence       1
SQL> show parameter log_achive
SQL> show parameter log_archive


NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config     string
log_archive_dest     string
log_archive_dest_1     string
log_archive_dest_10     string
log_archive_dest_2     string
log_archive_dest_3     string
log_archive_dest_4     string
log_archive_dest_5     string
log_archive_dest_6     string
log_archive_dest_7     string
log_archive_dest_8     string


NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_9     string
log_archive_dest_state_1     string enable
log_archive_dest_state_10     string enable
log_archive_dest_state_2     string enable
log_archive_dest_state_3     string enable
log_archive_dest_state_4     string enable
log_archive_dest_state_5     string enable
log_archive_dest_state_6     string enable
log_archive_dest_state_7     string enable
log_archive_dest_state_8     string enable
log_archive_dest_state_9     string enable


NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_duplex_dest     string
log_archive_format     string %t_%s_%r.dbf
log_archive_local_first     boolean TRUE
log_archive_max_processes     integer 2
log_archive_min_succeed_dest     integer 1
log_archive_start     boolean FALSE
log_archive_trace     integer 0
设置归档路径

SQL> alter system set log_archive_dest_1='location=/opt/app/arch';


System altered.
关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount 
ORACLE instance started.


Total System Global Area  285212672 bytes
Fixed Size    2020224 bytes
Variable Size  100666496 bytes
Database Buffers  180355072 bytes
Redo Buffers    2170880 bytes
Database mounted.
切换成归档

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       /opt/app/arch
Oldest online log sequence     0
Next log sequence to archive   1
Current log sequence       1
SQL> 
关闭数据库
SQL> shutdown immediate 




Database closed.
Database dismounted.
ORACLE instance shut down.
启动到mount  
SQL> startup mount
ORACLE instance started.


Total System Global Area  285212672 bytes
Fixed Size    2020224 bytes
Variable Size  100666496 bytes
Database Buffers  180355072 bytes
Redo Buffers    2170880 bytes
Database mounted.
切换到非归档
SQL> alter database noarchivelog;


Database altered.


阅读(785) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~