ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Archived Logfile Dest

Archived Logfile Dest

原创 Linux操作系统 作者:yang-jian-xin 时间:2009-10-01 12:26:43 0 删除 编辑

C:\Documents and Settings\yang-jx>Sqlplus Sys/Nod32 As Sysdba

SQL*Plus: Release 10.1.0.2.0 - Production on 星期四 10月 1 11:16:46 2009

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

Connected to an idle instance.

SQL> Startup Nomount
ORACLE instance started.

Total System Global Area  171966464 bytes
Fixed Size                              787988 bytes
Variable Size                        141294060 bytes
Database Buffers                29360128 bytes
Redo Buffers                        524288 bytes

SQL> Alter Database Mount ;

Database altered.

SQL> Archive Log List
Database log mode                 No Archive Mode
Automatic archival                    Disabled
Archive destination                   USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence   24
Current log sequence              26

SQL> Alter Database Archivelog ;

Database altered.

SQL> Alter Database Open ;

Database altered.

SQL> select to_char(sysdate,'yyyymmdd hh24miss') from dual ;

TO_CHAR(SYSDATE
---------------
20091001 143116

SQL> select name from v$archived_log where first_time > to_date('20091001 143116','yyyymmdd hh24miss') ;

no rows selected

SQL> alter system switch logfile ;

System altered.

SQL> alter system switch logfile ;

System altered.

SQL> select name from v$archived_log where first_time > to_date('20091001 143116','yyyymmdd hh24miss') ;

NAME
--------------------------------------------------------------------------------

D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\NOD32\ARCHIVELOG\2009_10_01\O1_MF_1_43_5D8MF3X9_.ARC


SQL> alter system set log_archive_dest_1='location=E:\yu\1' ;

System altered.

SQL> archive log list
Database log mode                  Archive Mode
Automatic archival                     Enabled
Archive destination                    E:\yu\1
Oldest online log sequence    42
Next log sequence to archive  44
Current log sequence               44
SQL> select to_char(sysdate,'yyyymmdd hh24miss') from dual ;

TO_CHAR(SYSDATE
---------------
20091001 143635

SQL> select name from v$archived_log where first_time > to_date('20091001 143635','yyyymmdd hh24miss') ;

no rows selected

SQL> alter system switch logfile ;

System altered.

SQL> alter system switch logfile ;

System altered.

SQL> select name from v$archived_log where first_time > to_date('20091001 143635','yyyymmdd hh24miss') ;

NAME
--------------------------------------------------------------------------------

E:\YU\1\ARC00045_0691945334.001

SQL> alter system set log_archive_dest_2='location=E:\yu\2' ;

System altered.

SQL> archive log list
Database log mode                  Archive Mode
Automatic archival                     Enabled
Archive destination                    E:\yu\2
Oldest online log sequence    47
Next log sequence to archive  49
Current log sequence               49

SQL> select to_char(sysdate,'yyyymmdd hh24miss') from dual ;

TO_CHAR(SYSDATE
---------------
20091001 163712

SQL> alter system switch logfile ;

System altered.

SQL> alter system switch logfile ;

System altered.

SQL> select name from v$archived_log where first_time > to_date('20091001 163712','yyyymmdd hh24miss') ;

NAME
--------------------------------------------------------------------------------

E:\YU\1\ARC00048_0691945334.001
E:\YU\2\ARC00048_0691945334.001

SQL>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21184539/viewspace-615926/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Dump File
下一篇: 张海迪的故事
请登录后发表评论 登录
全部评论

注册时间:2009-03-22

  • 博文量
    6
  • 访问量
    8692