1 person found this helpful
Could actually someone point me out if the second argument is mandatory?
Yes, it is mandatory.
The database has to know which encoding is used for the input file in order to load it correctly and convert data to the db charset (if necessary).
If you don't know the encoding of the file, you can always assume one such as UTF-8, or the db charset itself that you can specify using nls_charset_id('CHAR_CS').
That being said, the error you get is not expected. You should have received this :
SQL> select xmltype(bfilename('DATA_DIR', 'units.xml')) from dual;
select xmltype(bfilename('DATA_DIR', 'units.xml')) from dual
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'
which is much more clear.
So I guess there's another problem going on here. You should report it to Oracle Support.