来历:网海拾贝
- 琐屑环境:
- 1、独霸琐屑:Windows 2000 Server,呆板内存128M
2、数据库: Oracle 8i R2 (8.1.6) for NT 企业版
3、装置途径:C:ORACLE
- 完成步调:
-
1、办理器
SVRMGR> connect internal
SVRMGR> shutdown
SVRMGR> startup mount [dbname]
SVRMGR> alter database [dbname] archivelog; --升引归档形式
SVRMGR> archive log start --启动自动归档形式,重起数据库后,按init.ora设置配备安插
SVRMGR> alter database [dbname] open; --翻开数据库
SVRMGR> exit
2、批改数据库初始化参数文件,界说归档形式(自动)、归档日志文件保管途径、归档日志文件命名体例
3、从新启动数据库
- 仔细实例:
-
C:>svrmgrl
Oracle Server Manager Release 3.1.6.0.0 - Production
版权悉数 (c) 1997,1999,Oracle Corporation。保留悉数权益。
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SVRMGR> connect internal
毗连乐成。
SVRMGR> shutdown
已封闭数据库。
已卸下数据库。
已封闭 ORACLE 实例。
SVRMGR> startup mount
已启动 ORACLE 实例。
琐屑全局区域算计有 57124108个字节
Fixed Size 70924个字节
Variable Size 40198144个字节
Database Buffers 16777216个字节
Redo Buffers 77824个字节
已装入数据库。
SVRMGR> alter database archivelog;
语句已处理惩罚。
SVRMGR> archive log start
语句已处理惩罚。
SVRMGR> alter database open;
语句已处理惩罚。
SVRMGR> alter system switch logfile; --逼迫琐屑举行日志切换,可即刻不雅察到归档日志的产生发火
语句已处理惩罚。
SVRMGR> exit
效能器办理措施完毕。
批改数据库参数文件c:oracleadminoradbpfileinit.ora,
消除以下语句的#表明
log_archive_start = true
log_archive_dest_1 = "location=C:Oracleoradataoradbarchive"
log_archive_format = %%ORACLE_SID%%T%TS%S.ARC
封闭数据库,从新启动
查抄C:Oracleoradataoradbarchive目次下,可以看到类似ORADBT001S01201.ARC的文件,声名归档乐成
表明init.ora参数文件中关于归档重做日志参数项的含义
归档形式是自动仍是手工,true为自动,false为手工
log_archive_start = true
归档日志文件所保管的途径
log_archive_dest_1 = "location=C:Oracleoradataoradbarchive"
归档日志文件的命名体例
log_archive_format = %%ORACLE_SID%%T%TS%S.ARC
归档下令:
启动自动归档形式,琐屑重起后,将按init.ora中的参数log_archive_start的值设置归档体例
SVRMGR> archive log start
启入手工归档形式
SVRMGR> archive log stop
查抄归档信息:重做日志能否归档体例、是自动归档仍是手工归档、归档途径、最旧的联机日志循序号...
SVRMGR> archive log list
归档一个已满,但没有归档的联机重做日志
SVRMGR> archive log next
归档悉数已满,但没有归档的联机重做日志
SVRMGR> archive log all
注意:一个事务即便不被提交,也会被写入到重做日志中
版权声明: 原创作品,理睬转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。不然将清查司法责任。