吾生有涯,而知无涯,适当止学.循序渐进,步步提升 Talk is cheap, show me the code.
分类: Oracle
2015-04-22 11:33:45
一.以归档模式运行数据库
1.shutdown immediate关闭数据库
[oracle@oracle-n1 ~]$ sqlplus "/as sysdba"
SQL> shutdown immediate;
2.启动数据库到mount状态
SQL> startup mount
3.启用归档模式
SQL> alter database archivelog;
SQL> alter database open;
SQL> archive log list;
//查看归档状态
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /data/ora11g/product/11.2.0/db_1/dbs/arch
Oldest online log sequence 97
Next log sequence to archive 99
Current log sequence 99
二.查看和修改归档参数
1.修改存放归档路径位置
SQL> alter system set log_archive_dest_1='location=/arp/oraarp/oradata/arpdb/archivelog';
2.查看归档路径位置明细
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=/arp/oraarp/oradata/a
rpdb/archivelog
3.查看归档日志文件格式
SQL> show parameter log_archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.dbf
4.归档日志,验证归档日志正常
SQL> alter system
switch logfile;