创建归档目录:[Oracle@ORA9ISERV arch]$ mkdir -p /u01/app/oracle/oradata/orcl/arch设置log_archive_dest_1参数:SQL> alter system set log_archive_dest_1="LOCATION=/u01/app/oracle/oradata/orcl/arch" scope=both;System altered.查看log_archive_dest_1设置:SQL> show parameter log_archive_dest_1NAME TYPE VALUE------------------------------------ ---------------------- -------log_archive_dest_1 string LOCATION=/u01/app/oracle/oradata/orcl/archSQL> show parameter log_archive_dest_state_1NAME TYPE VALUE------------------------------------ ---------------------- -------log_archive_dest_state_1 string enable切换日志:SQL> alter system switch logfile;System altered.SQL> select sequence#,dest_id,archived,applied,deleted, status,first_time from v$archived_log order by sequence#;no rows selected观察并没有产生归档。查看数据库归档模式:SQL> archive log listDatabase log mode Archive ModeAutomatic archival Disabled --不解Archive destination /u01/app/oracle/oradata/orcl/archOldest online log sequence 4Next log sequence to archive 4Current log sequence 6Google:修改pfile参数文件,设置log_archive_start="TRUE"SQL> create pfile from spfile;File created.添加:log_archive_start="TRUE"*.log_archive_dest_1="LOCATION=/u01/app/oracle/oradata/orcl/arch"log_archive_start="TRUE"SQL> create spfile from pfile;File created.重启数据库:SQL> startupORACLE instance started.Total System Global Area 738793148 bytesFixed Size 452284 bytesVariable Size 335544320 bytesDatabase Buffers 402653184 bytesRedo Buffers 143360 bytesDatabase mounted.Database opened.查看数据库归档模式:SQL> archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination /u01/app/oracle/oradata/orcl/archOldest online log sequence 4Next log sequence to archive 6Current log sequence 6切换日志:SQL> alter system switch logfile;System altered.SQL> select sequence#,dest_id,archived,applied,deleted, status,first_time from v$archived_log order by sequence#; SEQUENCE# DEST_ID ARCHIV APPLIE DELETE ST FIRST_TIM---------- ---------- ------ ------ ------ -- --------- 4 1 YES NO NO A 19-APR-11 5 1 YES NO NO A 19-APR-11 6 1 YES NO NO A 19-APR-11 7 1 YES NO NO A 19-APR-11归档已经产生。查看归档目录是否有归档文件产生:[oracle@ORA9ISERV arch]$ pwd/u01/app/oracle/oradata/orcl/arch[oracle@ORA9ISERV arch]$ ls -ltotal 1124-rw-r----- 1 oracle oinstall 278528 Apr 19 13:37 1_4.dbf-rw-r----- 1 oracle oinstall 31232 Apr 19 13:37 1_5.dbf-rw-r----- 1 oracle oinstall 585728 Apr 19 13:38 1_6.dbf-rw-r----- 1 oracle oinstall 225280 Apr 19 13:42 1_7.dbf一切正常,完毕。Aix&Linux&Windows操作系统block size查看CentOS_5-x86-64下安装Oracle_11g相关资讯 Oracle教程
- Oracle中纯数字的varchar2类型和 (07/29/2015 07:20:43)
- Oracle教程:Oracle中查看DBLink密 (07/29/2015 07:16:55)
- [Oracle] SQL*Loader 详细使用教程 (08/11/2013 21:30:36)
| - Oracle教程:Oracle中kill死锁进程 (07/29/2015 07:18:28)
- Oracle教程:ORA-25153 临时表空间 (07/29/2015 07:13:37)
- Oracle教程之管理安全和资源 (04/08/2013 11:39:32)
|
本文评论 查看全部评论 (0)