5,139
社区成员




使用您给的awr生成的存储过程,
执行到这个片段时
FOR instance_rec IN (SELECT instance_number, instance_name FROM gv$instance) LOOP
awr_file_name := 'awr_' || today || '_inst' || instance_rec.instance_number || '.html';
awr_file := UTL_FILE.FOPEN(awr_dir, awr_file_name, 'w');
报错提示
ORA-29285: 文件写入错误
ORA-06512: 在 line 59
ORA-06512: 在 "SYS.UTL_FILE", line 148
ORA-06512: 在 "SYS.UTL_FILE", line 889
ORA-06512: 在 line 48
ORA-06512: 在 line 48
29285. 00000 - "file write error"
*Cause: Failed to write to, flush, or close a file.
*Action: Verify that the file exists, that it is accessible, and that
it is open in write or append mode.
检查下awr_dir,发现只生成了实例2的awr
之前运行这个脚本还挺好,今天就报错了
测试了下
ALTER SESSION SET CONTAINER=CDB$ROOT;
SELECT instance_number FROM gv$instance;
还是能够查到实例的number的
INSTANCE_NUMBER
---------------
2
3
1
求解答下
会不会这个文件名已经存在?看看Oracle对这个目录的访问权限。