如何使用 sysdba 权限创建 Oracle 数据库链接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8229992/
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 create Oracle database link with sysdba privilege
提问by CamilleHuot
I want to:
我想要:
select * from v$database@standby;
Problem:
问题:
- standbyis mounted so only a SYSDBAuser can connect to query it
- I can't find out how to use a database linkusing SYSDBAprivilege
- 备用数据库已挂载,因此只有SYSDBA用户可以连接以查询它
- 我不知道如何使用SYSDBA权限使用数据库链接
My goal is to display system information/stats from a standby Oracle database on a web page.
我的目标是在网页上显示来自备用 Oracle 数据库的系统信息/统计信息。
I'm using Oracle APEX. Pages are computed from mod_plsql which runs from an Oracle DB so it is easy to display the result of this kind of query.
我正在使用 Oracle APEX。页面是从 mod_plsql 计算的,mod_plsql 从 Oracle DB 运行,因此很容易显示这种查询的结果。
Alternative:
选择:
- How to select * from "shell script"?
- 如何从“shell脚本”中选择*?
采纳答案by DCookie
I don't think you can do this, based on the few things I've seen via Google.
根据我通过 Google 看到的一些事情,我认为您无法做到这一点。
To sum up, connecting remotely as sysdba uses authentication via the password file. Database links do not attempt to authenticate this way, they are authenticated in the remote database and not externally.
综上所述,作为 sysdba 远程连接使用通过密码文件进行身份验证。数据库链接不会尝试以这种方式进行身份验证,它们在远程数据库中进行身份验证,而不是在外部进行身份验证。
Here's a linkto a site that briefly touches upon the subject.
回答by orbfish
I think what you want is:
我想你想要的是:
CREATE PUBLIC DATABASE LINK STANDBY
rather than CREATE DATABASE LINK STANDBY. I just tested this from sqlplus / as sysdba and was able to query.
而不是创建数据库链接备用。我刚刚从 sqlplus / as sysdba 测试了这个并且能够查询。