如何检索 Oracle 目录路径?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6120465/
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
How to retrieve an Oracle directory path?
提问by Jose Rui Santos
I created the following Oracle Directory csvDir
:
我创建了以下 Oracle 目录csvDir
:
create or replace directory csvDir as
'd:\oracle\oradata\external_data\downloadedFiles';
Now, how can I retrieve the path from this csvDir
alias?
现在,我如何从这个csvDir
别名中检索路径?
There should be some system table that stores this path.
应该有一些系统表存储此路径。
回答by a_horse_with_no_name
That would be the ALL_DIRECTORIES view:
那将是 ALL_DIRECTORIES 视图:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/statviews_1075.htm#i1576965
http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/statviews_1075.htm#i1576965
回答by Frank Schmitt
select directory_path from dba_directories where upper(directory_name) = 'CSVDIR'
回答by Smart003
The ALL_DIRECTORIES data 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