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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6345304/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:20:48  来源:igfitidea点击:

How to find available directory objects on Oracle 11g system?

oraclemetadataoracle11g

提问by user272735

I assume this information is available in Oracle metadata tables, but where exactly ?

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

I need the directory object for BFILENAMEas in this answer: Using PL/SQL how do you I get a file's contents in to a blob?

我需要BFILENAME的目录对象,如本答案所示:使用 PL/SQL 如何将文件内容放入 blob?

I tried:

我试过:

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

But based on the output timestamps these are not the dirs created for me. This also doesn't show what is the real OS filepath for the object.

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

回答by Justin Cave

The ALL_DIRECTORIESdata dictionary view will have information about all the directories that you have access to. That includes the operating system path

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

SELECT owner, directory_name, directory_path
  FROM all_directories