查看并设置oracle数据的归档模式
1.改变非归档模式到归档模式:
1)以DBA身份连接数据库,查看是否为归档模式
SQL> conn / as sysdba
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 31
Current log sequence 33
2)立即关闭数据库
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3)启动实例并加载数据库到mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 318770144 bytes
Database Buffers 889192448 bytes
Redo Buffers 14753792 bytes
Database mounted.
4)更改数据库为归档模式
SQL> alter database archivelog;
Database altered.
5)打开数据库
SQL> alter database open;
SQL> SELECT NAME,created,log_mode FROM v$database;
NAME CREATED LOG_MODE
创新互联-专业网站定制、快速模板网站建设、高性价比望奎网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式望奎网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖望奎地区。费用合理售后完善,十载实体公司更值得信赖。
ORCL 04-JUN-12 ARCHIVELOG
Database altered.
6)启用自动归档 10G之前需要操作
SQL> alter system archive log start;
8)查看归档日志的路径和目录
SQL> show parameter db_recovery_file_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /data/app/oracle/flash_recovery_area
db_recovery_file_dest_size big integer 2G
9)修改方法归档日志位置及大小:
SQL> alter system set db_recovery_file_dest_size=20g;
SQL> alter system set db_recovery_file_dest='/app/arc';
网页标题:查看并设置oracle数据的归档模式
本文来源:http://pwwzsj.com/article/pdcdhj.html