oracle高手进

来源:百度知道 编辑:UC知道 时间:2024/07/07 13:45:57
create directory XML_DIR as 'D:\oracle'
/

DECLARE
QRYCTX DBMS_XMLGEN.CTXHANDLE;
dst_loc CLOB;
SAVCTX DBMS_XMLSTORE.CTXTYPE;
N NUMBER;
src_loc bfile := bfilename('XML_DIR', '11.XML');
amt number := dbms_lob.lobmaxsize;
src_offset number := 1;
dst_offset number := 1;
lang_ctx number := dbms_lob.default_lang_ctx;
warning number;
v_exists PLS_INTEGER := 0;
BEGIN
DBMS_LOB.CREATETEMPORARY(dst_loc, true);
DBMS_OUTPUT.PUT_LINE('------------ LOB LOADCLOBFORMFILE EXAMPLE ------------');

dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
v_exists := DBMS_LOB.fileexists(src_loc);
IF v_exists = 0 THEN
dbms_output.put_line('FILE NOT EXIST');
ELSE
dbms_output.put_line('FILE AND DIR VALID');
END IF;
dbms_lob.LOADCLOBFROMFILE(dst_loc,

ORA-06550: 第 4 行, 第 10 列:
PLS-00201: 必须说明标识符 'DBMS_XMLSTORE.CTXTYPE'
这个错误是说你还没有安装DBMS_XMLSTORE这个包,到网上搜索一下这个包在哪,然后安装上!

ORA-06550: 第 45 行, 第 3 列:
PLS-00320: 此表达式的类型说明不完整或格式不正确
这个错误我不知道你具体定位到那一行,看看下面对这个错误的解释以及解决办法
PLS-00320: the declaration of the type of this expression is incomplete or malformed
Cause: In a declaration, the name of a variable or cursor is misspelled or the declaration makes a forward reference. Forward references are not allowed in PL/SQL. A variable or cursor must be declared before it is referenced it in other statements, including other declarative statements. For example, the following declaration of dept_rec raises this exception because it refers to a cursor not yet declared: DECLARE dept_rec dept_cur%ROWTYPE; CURSOR dept_cur IS SELECT ... ...
Action: Check the spelling of all identifiers in the declaration. If necessary, move the declaration so that it makes no forward references.