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

发布于 2024-11-15 12:31:13 字数 1418 浏览 2 评论 0原文

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

我需要 BFILENAME 正如这个答案:使用 PL/SQL 如何将文件的内容放入 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

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

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

I need the directory object for BFILENAME as in this answer: Using PL/SQL how do you I get a file's contents in to a 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨小墨 2024-11-22 12:31:13

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

SELECT owner, directory_name, directory_path
  FROM all_directories

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

SELECT owner, directory_name, directory_path
  FROM all_directories
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文