oracle “更改用户系统标识为”不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18752676/
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
"Alter user sys identified by" not working
提问by dhcarmona
First of all, I use:
首先,我使用:
Windows 7 x64 Oracle Enterprise 11g R2 x32
Windows 7 x64 Oracle Enterprise 11g R2 x32
I have some basic experience with SQL Server and MySQL (more with MySQL). Today I started working with Oracle, and I've been bumping a lot on the way.
我有一些 SQL Server 和 MySQL 的基本经验(更多的是 MySQL)。今天,我开始与 Oracle 合作,一路上遇到了很多困难。
The problem I'm having now is that, for some reason, I can't connect to any sys user (sysdba or sysoper). Probably I made a mistake writing the password when creating the database, but I'm not sure, so I'm trying to change it.
我现在遇到的问题是,由于某种原因,我无法连接到任何 sys 用户(sysdba 或 sysoper)。可能我在创建数据库时写错了密码,但我不确定,所以我正在尝试更改它。
I've been trying, as some searches had led me to try, to use
我一直在尝试,因为一些搜索让我尝试使用
sqlplus /nolog
connect / as sysdba
alter user sys identified by new_pass;
And it seems to work. I mean, it says "User altered". However, I still can't log in sqlplus with the new password. It's a little weird, since I can connect to "sysman" with my original password, but it doesn't have the privileges I need.
它似乎有效。我的意思是,它说“用户已更改”。但是,我仍然无法使用新密码登录sqlplus。这有点奇怪,因为我可以使用我的原始密码连接到“sysman”,但它没有我需要的权限。
I'd appreciate any help I could get, and I thank you beforehand.
如果我能得到任何帮助,我将不胜感激,并在此先感谢您。
回答by adona9
After you log in with 'sqlplus / as sysdba', try changing the password for system by issuing
使用“sqlplus / as sysdba”登录后,尝试通过发出以下命令更改系统密码
ALTER USER system IDENTIFIED BY abcdef;
Then, to make sure, without quitting sqlplus:
然后,确保不退出 sqlplus:
CONN system/abcdef
That should work. After that, you can log on with system/abcdef when you start sqlplus.
那应该有效。之后启动sqlplus就可以用system/abcdef登录了。
回答by user11266557
The ORA-01994 error happens when you forget to use the orapwd command, and it critical to note that the name of the file must be orapwsid, and you must supply the full path name when using the orapwd command. 'orapwsid' sid is case sensitive.
当您忘记使用 orapwd 命令时会发生 ORA-01994 错误,请务必注意文件名必须是 orapwsid,并且您在使用 orapwd 命令时必须提供完整路径名。'orapwsid' sid 区分大小写。
回答by TRicks43
A No Root password installation's the default. Now you were logged in as root@'%', but a bug exists. Compare how two SQL statements react:
无 Root 密码安装是默认设置。现在您以 root@'%' 身份登录,但存在错误。比较两条 SQL 语句的反应:
ALTER USER CURRENT_USER() IDENTIFIED BY 'mariadb';
Always outputs mysql_native_password | |
总是输出 mysql_native_password | |
alter user root@'%' identified by 'mariadb';
Job works and the root's identified by new password.
工作正常,root 由新密码识别。
mysql_native_password | *54958E764C
回答by Saqib Ahmed
I faced same problem in my server and I resolved them by following solution.
我在我的服务器中遇到了同样的问题,我通过以下解决方案解决了它们。
steps of solution.
解决步骤。
1) change sys password from database connect with /as sysdba
1) 更改 sys 密码从数据库连接到 /as sysdba
2) down application and database and restart both 1 database 2 application
2) 关闭应用程序和数据库并重新启动 1 个数据库 2 个应用程序
3) start listener and database then application.
3)启动监听器和数据库然后应用程序。
now both are working fine.
现在两者都工作正常。