oracle 编辑数据出现 file access denied怎么解决

如题所述

oracle 编辑数据出现 file access denied怎么解决
oracle在导入数据时报1659的错误的原因主要是数据库表空间剩余空间不足引起的。

分析原因
1、表空间剩余空间不足。
使用下面语句,查看表空间剩余空间
select Upper(f.tablespace_name) "表空间名",
d.tot_grootte_mb "表空间大小(M)",
d.tot_grootte_mb - f.total_bytes "已使用空间(M)",
to_char(round((d.tot_grootte_mb - f.total_bytes) /
d.tot_grootte_mb * 100, 2),'990.99') || '%' "使用比",
f.total_bytes "空闲空间(M)",
f.max_bytes "最大块(M)"
from (select tablespace_name,
round(sum(bytes) / (1024 * 1024), 2) total_bytes,
round(max(bytes) / (1024 * 1024), 2) max_bytes
from sys.dba_free_space
group by tablespace_name) f,
(select dd.tablespace_name,
round(sum(dd.bytes) / (1024 * 1024), 2) tot_grootte_mb
from sys.dba_data_files dd
group by dd.tablespace_name) d
where d.tablespace_name = f.tablespace_name
order by f.tablespace_name;
表空间剩余空间不足时,可以根据原数据库表空间大小增加表空间。
alter tablespace 表空间名 add datafile '数据文件名' size 数据文件大小;
2、剩余表空间还很多。
使用下面语句查看原数据库表表定义,找到initial_extent值大的表,将这些表的
创建语句导出后修改initial_extent值,在目标数据库中创建后再导入数据,导入时
增加参数ignore=y。
select table_name, initial_extent
from user_tables
where initial_extent is not null
order by initial_extent desc
如果找不到原数据库,可以使用
imp userid/userid@service_name file=dmp文件名 indexfile=index文件名 rows=n full=Y
命令将dmp文件中创建表的语句导入到indexfile文件中,查看indexfile如下:
REM CREATE TABLE "TEST"."DM_KJKM_COPY" ("KJZDMB_DM" VARCHAR2(100)
REM ENABLE, "KMID" NUMBER(20, 0), "KMBM" VARCHAR2(100), "KMMC"
REM VARCHAR2(500), "KMQC" VARCHAR2(1000), "KMLB_DM" VARCHAR2(100),
REM ...
使用文本编辑工具,查找INITIAL将过大的初始值改为65536后,将REM去除后,在数据库中创建后再使用exp导入数据,导入时增加参数ignore=y。
温馨提示:答案为网友推荐,仅供参考
相似回答