oracle Sqlplus无需密码登录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20144415/
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
Sqlplus login without password
提问by DexteC
I installed Oracle 11gR2 on my linux server. When I want to login via sys user on my db, I enter "sys as sysdba" and when system give password , I push enter and I can login on my db with sqlplus.
我在我的 linux 服务器上安装了 Oracle 11gR2。当我想通过 sys 用户登录我的数据库时,我输入“sys as sysdba”,当系统给出密码时,我按下回车键,我可以使用 sqlplus 登录我的数据库。
But, when I try to connect on Windows with PL-SQL tool, system wants to password. If I didn't write password (I defined password, password is "sys"), I cannot login on my db.
但是,当我尝试使用 PL-SQL 工具在 Windows 上连接时,系统需要输入密码。如果我没有写密码(我定义了密码,密码是“sys”),我就无法登录我的数据库。
Why?
为什么?
采纳答案by Alen Oblak
When you install oracle, it creates OSDBA and OSOPER groups. Any members of this groups will have OS authentication and can logon without a password.
当您安装 oracle 时,它会创建 OSDBA 和 OSOPER 组。该组的任何成员都将具有操作系统身份验证,并且无需密码即可登录。
When you connect from another machine, it's a remote connection and you must enter the password.
当您从另一台机器连接时,它是远程连接,您必须输入密码。
More info in the documentation.
文档中的更多信息。
回答by Alex Poole
When you connect on the same server you're being authenticated by the operating system; you can give any password you like, or it's more common to use / as sysdba
.
当您在同一台服务器上连接时,操作系统正在对您进行身份验证;您可以提供任何您喜欢的密码,或者更常用的是/ as sysdba
.
When you connect from PL/SQL it'a a remote connection; operating system authentication isn't possible, so you're using password authentication.
当您从 PL/SQL 连接时,它是一个远程连接;操作系统身份验证是不可能的,因此您使用的是密码身份验证。
回答by Laenka-Oss
I had such a problem and even with Oracle 12c on my linux server and what i did was that each time I open a new terminal I first type
我有这样的问题,即使在我的 linux 服务器上使用 Oracle 12c,我所做的是每次打开一个新终端时我首先输入
"export TWO_TASK="
“出口TWO_TASK=”
(without the the quotations) followed by pressing
(没有引号)然后按
enter.
输入.
Next I could then go ahead to type sqlplus "/as sysdba"(now as it is with the quotations)
接下来,我可以继续输入sqlplus "/as sysdba"(现在和引号一样)
to connect and continue.
连接并继续。