ORA-29280: invalid directory path
https://www.cndba.cn/debimeng/article/3134https://www.cndba.cn/debimeng/article/3134
数据库版本:11.2.0.4;系统版本:Oracle Linux 6.4
https://www.cndba.cn/debimeng/article/3134
场景:
使用v_filehandle:=utl_file.fopen(‘/data’,’output_test.txt’,’w’);打开文本时报错如下:
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at “SYS.UTL_FILE”, line 41
ORA-06512: at “SYS.UTL_FILE”, line 478
ORA-06512: at line 4https://www.cndba.cn/debimeng/article/3134https://www.cndba.cn/debimeng/article/3134
https://www.cndba.cn/debimeng/article/3134https://www.cndba.cn/debimeng/article/3134
解决:
原:11g以后建议使用directory替换utl_file,这时写具体的路径会提示无效路径
https://www.cndba.cn/debimeng/article/3134https://www.cndba.cn/debimeng/article/3134https://www.cndba.cn/debimeng/article/3134
使用directory即可,创建directory
SQL> create directory utl_data as ‘/data’;
并更改为(注意directory需要大写)
v_filehandle:=utl_file.fopen(‘UTL_DATA’,’output_test.txt’,’w’);
版权声明:本文为博主原创文章,未经博主允许不得转载。
ORA-29280,utl_file