如何在Oracle 11g系统上查找可用的目录对象?

时间:2011-06-14 14:39:33

标签: oracle metadata oracle11g

我假设这些信息在Oracle元数据表中可用,但究竟在哪里?

我需要BFILENAME的目录对象,如以下答案所示:Using PL/SQL how do you I get a file's contents in to a blob?

我试过了:

select * from all_objects where object_type ='DIRECTORY';

OWNER                  OBJECT_NAME
------------------------------ ------------------------------
SUBOBJECT_NAME          OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------- -------------------
CREATED         LAST_DDL_TIME   TIMESTAMP       STATUS  T G S
------------------- ------------------- ------------------- ------- - - -
 NAMESPACE EDITION_NAME
---------- ------------------------------
SYS                ORACLE_OCM_CONFIG_DIR
                    12689        DIRECTORY
2010-03-30 10:16:30 2011-01-10 12:49:39 2011-01-10:12:49:39 VALID   N N N
     9

SYS                DATA_PUMP_DIR
                    12764        DIRECTORY
2010-03-30 10:16:43 2011-01-10 12:49:38 2011-01-10:12:49:38 VALID   N N N
     9

SYS                XMLDIR
                    57134        DIRECTORY
2010-03-30 10:29:37 2010-03-30 10:29:37 2010-03-30:10:29:37 VALID   N N N
     9

但根据输出时间戳,这些不是为我创建的目录。这也没有显示对象的真实操作系统文件路径。

1 个答案:

答案 0 :(得分:67)

ALL_DIRECTORIES数据字典视图将包含有关您有权访问的所有目录的信息。这包括操作系统路径

SELECT owner, directory_name, directory_path
  FROM all_directories