Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:/Documents and Settings/Hawk> sqlplus/nolog
SQL * Plus: Release 9.0.1.4.0-production on Tuesday July 18 15:08:15 2006
(C) Copyright 2001 Oracle Corporation. All rights reserved.
SQL> connect system/System
Connected.
SQL> Create Table testlob (ID number, thelob clob );
The table has been created.
SQL> Create or replace directory dir1 as 'd:/test /';
The directory has been created.
SQL> Create or replace procedure load_lob
2 l_clob clob;
3 l_bfile bfile;
4 begin
5 insert into testlob values (1, empty_clob ())
6 returning thelob into l_clob;
7
8 l_bfile: =bfilename('dir1', 'control.txt ');
9 dbms_lob.fileopen (l_bfile );
10
11 dbms_lob.loadfromfile (l_clob, l_bfile, dbms_lob.getlength (l_bfile ));
12 dbms_lob.fileclose (l_bfile );
13 end;
14/
The process has been created.
SQL> execute load_lob
The PL/SQL process is successfully completed.
SQL> select * From testlob;
Id thelob
----------------------------------------
1 rows? Too many? Why are there too many other users? Why? Too many? Slow failover? Too many? Dirty data? Jing Yu
SQL> commit;
Submitted.
SQL> select ID, dbms_lob.getlength (thelob) thelob from testlob;
Id thelob
--------------------
1 59
SQL>