1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| $ pwd
/u01/app/oracle/product/11.2.0/db/rdbms/log
$ ls
abc
$ sqlplus yong/yong
SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 9 21:15:52 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select directory_path from dba_directories where directory_name = 'DATA_PUMP_DIR';
DIRECTORY_PATH
---------------------------------------------------------------------------------------
/u01/app/oracle/product/11.2.0/db/rdbms/log/
SQL> var bf bfile
SQL> exec :bf := bfilename('DATA_PUMP_DIR', 'abc')
PL/SQL procedure successfully completed.
SQL> select dbms_lob.fileexists(:bf) from dual;
DBMS_LOB.FILEEXISTS(:BF)
------------------------
1
SQL> exec :bf := bfilename('DATA_PUMP_DIR', 'NoSuchFile')
PL/SQL procedure successfully completed.
SQL> select dbms_lob.fileexists(:bf) from dual;
DBMS_LOB.FILEEXISTS(:BF)
------------------------
0 |
Partager