分类:
2012-05-25 14:29:23
原文地址:备库磁盘空间满后的处理 作者:hxl
SQL> archive log list; (备库)
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/duplicate/
Oldest online log sequence 132
Next log sequence to archive 0
Current log sequence 147
2.备库归档目录已经使用了100%
[oracle@hxlbak ~]$ df (备库)
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 7780676 3393768 3985288 46% /
tmpfs 499152 0 499152 0% /dev/shm
/dev/sda3 10970784 10404452 44 100% /u01
3.查看备库的归档路径1(因为下面的步骤需要修改该参数)
SQL> show parameters log_archive_dest_1;(备库)
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=/u01/app/oracle/dupli
cate/ valid_for=(all_logfiles,all_
roles) db_unique_name=oraclbak
4.修改备库的归档路径(将之前的目录u01修改为u02,u02是加载在新添加的硬盘上的)
SQL>alter system set log_archive_dest_1='location=/u02/app/oracle/duplicate/ valid_for=(all_logfiles,all_roles) db_unique_name=oraclbak' scope=spfile;(备库)
5.重启备库
SQL> shutdown immediate(备库)
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount (备库)
ORACLE instance started.
Total System Global Area 1048576000 bytes
Fixed Size 1223368 bytes
Variable Size 268436792 bytes
Database Buffers 775946240 bytes
Redo Buffers 2969600 bytes
Database mounted.
6.备库应用归档日志
SQL> alter database recover managed standby database disconnect from session;(备库)
7.主库切换日志
SQL> alter system switch logfile;(主库)
System altered.
SQL> alter system switch logfile;(主库)
System altered.
8.主库的归档日志已经传到备库修改后的归档路径
[root@hxlbak duplicate]# pwd
/u02/app/oracle/duplicate
[root@hxlbak duplicate]# ls -l
total 16
-rw-r----- 1 oracle oinstall 12288 May 23 05:26 1_151_775456988.arc
-rw-r----- 1 oracle oinstall 1024 May 23 05:27 1_152_775456988.arc
-- The End --