java.sql.SQLException: ORA-01691: Lob 段 GWTRAVEL.SYS_LOB0000104910C00003$$ 无法通过 1024 (在表空间 GWTRAVEL 中) 扩展
ORA-06512: 在 "GWTRAVEL.CALL_POST_WEB", line 49
ORA-29266: 已达到正文的末尾
存储过程如下:
create or replace procedure CALL_POST_WEB( requrl in varchar2 , reqbody in varchar2 , sessionId in INTEGER,resenv out clob,statuscode out NUMBER, newSessionId out INTEGER) IS
http_req UTL_HTTP.REQ;
http_Resp UTL_HTTP.RESP;
request_env VARCHAR2(32767);
l_Replyline VARCHAR2(32767);
http_url VARCHAR2(1000);
UUID VARCHAR2(32);
respText clob;
begin
request_env := reqbody;
http_url := requrl;
if sessionId is not null then
RESTORE_COOKIES(sessionId);
end if;
http_req:=Utl_Http.begin_request(http_url,'POST',UTL_HTTP.http_version_1_1);
Utl_Http.Set_Persistent_Conn_Support(http_req, TRUE);
--set header
UTL_HTTP.set_header(http_req, 'Accept', 'application/json;charset=UTF-8');
UTL_HTTP.set_header(http_req, 'Accept-Encoding', 'gzip, deflate');
UTL_HTTP.set_header(http_req, 'Accept-Language', 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3');
Utl_Http.set_header(http_req, 'Connection', 'keep-alive');
Utl_Http.Set_Header(http_req, 'Content-Length', Lengthb(request_env));
Utl_Http.set_header(http_req, 'Content-Type','application/json;charset=UTF-8');
Utl_Http.Set_Body_Charset(http_req, 'utf-8');
Utl_Http.Write_Line(http_req, request_env);
http_Resp := Utl_Http.Get_Response(http_req);
statuscode := http_Resp.status_code;
if sessionId is null then
newSessionId:=save_cookies();
end if;
-- dbms_output.put_line(statuscode);
begin
select sys_guid() into UUID from dual;
dbms_lob.createtemporary(respText,true);
loop
Utl_Http.read_text(http_Resp, l_Replyline,800);
dbms_lob.append(respText,to_clob(l_Replyline));
end loop;
end;
EXCEPTION
WHEN utl_http.end_of_body THEN
resenv:= UUID;
insert into DATA_RECV values(UUID,http_url,respText,sysdate);
commit;
Utl_Http.end_response(http_Resp);
UTL_TCP.CLOSE_ALL_CONNECTIONS();
when others then
statuscode := -99;
resenv := 'error!';
Utl_Http.end_response(http_Resp);
Utl_Http.end_request(http_req);
UTL_TCP.CLOSE_ALL_CONNECTIONS();
--dbms_output.put_line(statuscode);
--dbms_output.put_line(resenv);
raise;
end CALL_POST_WEB;
问题:
显示在insert into DATA_RECV values(UUID,http_url,respText,sysdate);报错
错误信息:
ORA-06512: 在 "GWTRAVEL.CALL_POST_WEB", line 49
ORA-29266: 已达到正文的末尾
求大神帮忙解决
应该是 GWTRAVEL 表空间不足,适当加一点应该就能解决,详情看下面
--查看表空间使用情况,增加表空间 INST_ID
SELECT a.tablespace_name tablespace_name,'onilne',
round(total / (1024 * 1024 * 1024), 2) "表空间大小(G)",
round((total - free) / (1024 * 1024 * 1024), 2) "表空间使用大小(G)",
round(free / (1024 * 1024 * 1024), 2) "表空间剩余大小(G)",
round((total - free) / total, 4) * 100 "使用率 %"
FROM (SELECT tablespace_name, SUM(bytes) free
FROM dba_free_space
GROUP BY tablespace_name) a,
(SELECT tablespace_name, SUM(bytes) total
FROM dba_data_files
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name
order by 6 desc;
--临时表空间添加临时文件
--这个语句用于在指定的表空间中添加一个临时文件,这个临时文件用于执行排序和临时存储查询结果。它通常用于支持数据库查询操作,而不是存储用户数据。
alter temporary tablespace tablespace_name add tempfile size 500M;
ALTER temporary TABLESPACE tablespace_name ADD DATAFILE '/path/to/new/tempfile_20230923.dbf' SIZE 500M;
--普通表空间添加数据文件
这个语句用于在指定的表空间中添加一个数据文件,这个数据文件可以用于存储用户表的数据。数据文件通常包含用户的数据,例如表和索引。
alter tablespace tablespace_name add DATAFILE size 500M;
ALTER TABLESPACE tablespace_name ADD DATAFILE '/path/to/new/file_20230923.dbf' SIZE 500M;
但是为啥要用oracle跑http请求?这真是知识盲区了