開啟歸檔模式

jichengjie發表於2012-06-07
SQL>alter system set log_archive_start=TRUE scope=spfile;
SQL>alter system set log_archive_dest_1='LOCATION=/u01/ora9/oradata/itown01/archive' scope=spfile;
 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  236000356 bytes
Fixed Size                   451684 bytes
Variable Size             201326592 bytes
Database Buffers           33554432 bytes
Redo Buffers                 667648 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
> ls
> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Thu Jun 7 15:47:31 2012
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> alter system switch logfile;
System altered.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
> ls
1_1330.dbf
 
注:在oracle10g只需要執行開啟歸檔模式命令即可
SQL> alter database archivelog;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-732168/,如需轉載,請註明出處,否則將追究法律責任。

相關文章