故障描述:在归档时报错
SQL> alter system archive log current;
alter system archive log current
*
ERROR at line 1:
ORA-16038: log 1 sequence# 1 cannot be archived
ORA-19504: failed to create file ""
ORA-00312: online log 1 thread 1:
'+DGROUP1/fox10g/onlinelog/group_1.262.746118439'
ORA-00312: online log 1 thread 1:
'+DGROUP1/fox10g/onlinelog/group_1.263.746118439'
怀疑是路径问题
用asmcmd进入路径查看
D:\ORACLE\product\10.2.0\db_1>asmcmd
"asmcmd: the environment variable ORACLE_HOME is not set."
D:\ORACLE\product\10.2.0\db_1>set oracle_sid=+ASM
D:\ORACLE\product\10.2.0\db_1>asmcmd
"asmcmd: the environment variable ORACLE_HOME is not set."
D:\ORACLE\product\10.2.0\db_1>set oracle_home=D:\ORACLE\product\10.2.0\db_1
D:\ORACLE\product\10.2.0\db_1>asmcmd
ASMCMD> cd +dgroup1
ASMCMD> ls
FOX10G/
ASMCMD> cd fox10g
ASMCMD> ls
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfilefox10g.ora
ASMCMD> cd archivelog
ASMCMD> ls
2011_03_22/
2011_03_23/
ASMCMD> cd 2011_03_23
ASMCMD> ls
thread_1_seq_148.373.746499463
thread_1_seq_149.375.746507283
ASMCMD> mkfs a
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> mkdir test
在归档目录下创建新目录没有问题
ASMCMD> ls
test/
thread_1_seq_148.373.746499463
thread_1_seq_149.375.746507283
ASMCMD> pwd
+dgroup1/fox10g/archivelog/2011_03_23
ASMCMD> exit
通过在该路径下新增一个表空间文件判断是否可以在该路径写文件
fox10g> create tablespace t datafile '+dgroup1/fox10g/archivelog/2011_03_23/t' size 1m;
create tablespace t datafile '+dgroup1/fox10g/archivelog/2011_03_23/t' size 1m
*
ERROR at line 1:
ORA-01119: error in creating database file
'+dgroup1/fox10g/archivelog/2011_03_23/t'
ORA-17502: ksfdcre:4 Failed to create file
+dgroup1/fox10g/archivelog/2011_03_23/t
ORA-15041: diskgroup space exhausted
由上面信息怀疑是空间不足
增加一个磁盘
D:\ORACLE\product\10.2.0\db_1>asmtool -create d:\oracle\oradata\asmfiles\disk8 200m;
加载到磁盘组
SQL> alter diskgroup dgroup1 add disk 'D:\ORACLE\ORADATA\ASMFILES\DISK*';
alter diskgroup dgroup1 add disk 'D:\ORACLE\ORADATA\ASMFILES\DISK*'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15029: disk 'D:\ORACLE\ORADATA\ASMFILES\DISK1' is already mounted by this
instance
SQL> alter diskgroup dgroup1 add disk 'D:\ORACLE\ORADATA\ASMFILES\DISK8';
Diskgroup altered.
查看剩余空间
SQL> select name,total_mb,free_mb from v$asm_diskgroup;
NAME TOTAL_MB FREE_MB
------------------------------ ---------- ----------
DGROUP1 1600 190
做一次日志切换
SQL> alter system switch logfile;
System altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5
归档成功
SQL> alter system archive log current;
System altered.
阅读(1439) | 评论(0) | 转发(0) |