oracle 我无法登录oracle系统帐户
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41083540/
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
I can't login to oracle system account
提问by mitzy
I recently installed oracle 12c and can't access the system local generated connection. (Ora-01017 error) eventhough I know for a fact its correct because I changed the password. Anyway, someone else on stackoverflow redirected me to this https://iwikte.wordpress.com/2008/11/28/unlock-oracle-system-account/, and I don't know how to set up these environment variables. I need help. If it makes any difference i'm using windows 10. If these environment variables are not set automatically, do it manually (export ORACLE_HOME=/opt/oracle/VIS/db/tech_st/10.2.0
我最近安装了oracle 12c,无法访问系统本地生成的连接。(Ora-01017 错误)尽管我知道它是正确的,因为我更改了密码。无论如何,stackoverflow 上的其他人将我重定向到这个https://iwikte.wordpress.com/2008/11/28/unlock-oracle-system-account/,我不知道如何设置这些环境变量。我需要帮助。如果它有任何区别,我使用的是 Windows 10。如果这些环境变量没有自动设置,请手动设置(导出 ORACLE_HOME=/opt/oracle/VIS/db/tech_st/10.2.0
export ORACLE_SID=VIS
导出 ORACLE_SID=VIS
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin)
导出路径=$PATH:$HOME/bin:$ORACLE_HOME/bin)
回答by Kacper
Please first try without setting variables.
请先尝试不设置变量。
Please run SQLPlus as administrator and connect as sysdba without giving password. If your variables are set properly you can just type sqlplus
in cmd
if not please find SqlPlus
in your programs. Then type:
请以管理员身份运行 SQLPlus 并以 sysdba 身份连接而不提供密码。如果您的变量设置正确,您只需输入即可sqlplus
,cmd
否则请SqlPlus
在您的程序中找到。然后输入:
conn / as sysdba
If that won't. Please go to your ORACLE HOME
directory and edit %ORACLE_HOME%\network\admin\sqlnet.ora
file and check if there is SQLNET.AUTHENTICATION_SERVICES = (NTS)
if not NTS
change to NTS
and restart database. Then retry with conn / as sysdba
如果那不会。请到您的ORACLE HOME
目录和编辑%ORACLE_HOME%\network\admin\sqlnet.ora
文件,并检查是否存在SQLNET.AUTHENTICATION_SERVICES = (NTS)
,如果不NTS
改变NTS
并重新启动数据库。然后重试conn / as sysdba
When connected you can just call:
alter user sys identified by YOUR_NEW_PASS;
or for SYSTEM
user alter user SYSTEM identified by YOUR_NEW_PASS account unlock;
and login with new password.
连接后,您只需拨打:
alter user sys identified by YOUR_NEW_PASS;
或为SYSTEM
用户alter user SYSTEM identified by YOUR_NEW_PASS account unlock;
并使用新密码登录。
By the way why do you need to log as SYSTEM
? Not just sys as sysdba
? Some comparisonabout system accounts.
顺便说一句,你为什么需要登录为SYSTEM
?不只是sys as sysdba
?关于系统账户的一些比较。
The instruction you got is for linux. In Windows one set environmental variables like shown here
你得到的指令是针对 linux 的。在Windows中一组环境变量和所示这里
回答by ManishSingh
from oracle version 12.2.x users cannot login using case insensitive passwords, even though SEC_CASE_SENSITIVE_LOGON = FALSE if PASSWORD_VERSIONS of user is not 10g.
从 oracle 版本 12.2.x 开始,用户不能使用不区分大小写的密码登录,即使 SEC_CASE_SENSITIVE_LOGON = FALSE 如果用户的 PASSWORD_VERSIONS 不是 10g。
following sql should show the PASSWORD_VERSIONS for a user.
以下 sql 应显示用户的 PASSWORD_VERSIONS。
select USERNAME,ACCOUNT_STATUS,PASSWORD_VERSIONS from dba_users;
USERNAME ACCOUNT_STATUS PASSWORD_VERSIONS
--------------- -------------- -----------------
dummyuser OPEN 11G 12C
to make PASSWORD_VERSIONS compatible with 10g
使 PASSWORD_VERSIONS 与 10g 兼容
- add/modify line in sqlnet.ora of database to have SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
- restart database
- change/expire password for existing user
- new users created will also have same settings
- 在数据库的 sqlnet.ora 中添加/修改行以具有 SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
- 重启数据库
- 更改/过期现有用户的密码
- 创建的新用户也将具有相同的设置
after above steps PASSWORD_VERSIONS should be something like this
经过上述步骤 PASSWORD_VERSIONS 应该是这样的
select USERNAME,ACCOUNT_STATUS,PASSWORD_VERSIONS from dba_users;
USERNAME ACCOUNT_STATUS PASSWORD_VERSIONS
--------------- -------------- -----------------
dummyuser OPEN 10G 11G 12C