oracle 12C SYS,SYSTEM用户的密码都忘记或是丢失

Posted C# java C++ 开源通信

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle 12C SYS,SYSTEM用户的密码都忘记或是丢失相关的知识,希望对你有一定的参考价值。

密码

1 conn / as sysdba
2 alter user system identified by Abcd1234;

 

 

manual script first -->manual_script_before_install.sql

 1 -- must connect as sysdba to execute the following script
 2 -- this manual script is to minimize the configuration change on the Oracle database server
 3 
 4 -- we suggest you use the default SYSTEM user during the installation
 5 -- if you choose a user other than SYSTEM during installation, you need change SYSTEM in the script to that username 
 6 
 7 --METADATA TYPE:GRANT OBJECT:DBMS_JMS_PLSQL PRIVILEGE:EXECUTE GRANTEE:SYSTEM
 8 GRANT EXECUTE ON sys.DBMS_REPUTIL TO SYSTEM with grant option 
 9 /
10 --METADATA TYPE:GRANT OBJECT:DBMS_JMS_PLSQL PRIVILEGE:EXECUTE GRANTEE:SYSTEM
11 GRANT SELECT ON sys.DBA_VIEWS TO SYSTEM with grant option
12 /
13 --METADATA TYPE:GRANT OBJECT:DBMS_JMS_PLSQL PRIVILEGE:EXECUTE GRANTEE:SYSTEM
14 GRANT EXECUTE ON sys.DBMS_LOB TO SYSTEM with grant option
15 /
16 --METADATA TYPE:GRANT OBJECT:DBMS_JMS_PLSQL PRIVILEGE:EXECUTE GRANTEE:SYSTEM
17 GRANT EXECUTE ON sys.DBMS_SQL TO SYSTEM with grant option
18 /
19 --METADATA TYPE:GRANT OBJECT:DBMS_JMS_PLSQL PRIVILEGE:EXECUTE GRANTEE:SYSTEM
20 GRANT EXECUTE ON sys.DBMS_JOB TO SYSTEM with grant option
21 /
22 --METADATA TYPE:GRANT OBJECT:DBMS_JMS_PLSQL PRIVILEGE:EXECUTE GRANTEE:SYSTEM
23 GRANT EXECUTE ON sys.DBMS_RANDOM TO SYSTEM with grant option
24 /
25 --METADATA TYPE:GRANT OBJECT:V_$TRANSACTION PRIVILEGE:EXECUTE GRANTEE:SYSTEM
26 GRANT SELECT ON sys.V_$TRANSACTION TO SYSTEM with grant option 
27 /
28 --METADATA TYPE:GRANT OBJECT:GV_$TRANSACTION PRIVILEGE:EXECUTE GRANTEE:SYSTEM
29 GRANT SELECT ON sys.gv_$TRANSACTION TO SYSTEM with grant option 
30 /

 

1 admuser
2 privuser
3 pubuser
4 bgjobuser
5 pxrptuser
6 
7 Abcd1234

更新 Oracle 主目录用户的口令

 1 @echo off
 2 
 3 @setlocal
 4 
 5 @set OH=C:\app\b\product\12.1.0\dbhome_1
 6 @set JRE_LOCATION=jdk\jre
 7 @set JLIB_LOCATION=jlib
 8 
 9 @set JRE_DIR=%OH%\%JRE_LOCATION%
10 @set JLIB_DIR=%OH%\%JLIB_LOCATION%
11 
12 @set JRE=%JRE_DIR%\bin\java
13 
14 @set JNDI_JAR=%JLIB_DIR%\jndi.jar
15 @set SRVM_JAR=%JLIB_DIR%\srvm.jar
16 @set SRVMHAS_JAR=%JLIB_DIR%\srvmhas.jar
17 @set HOMEUSERCTL_JAR=%JLIB_DIR%\homeuserctl.jar
18 
19 @set CLASSPATH=%HOMEUSERCTL_JAR%;%JNDI_JAR%;%SRVM_JAR%;%SRVMHAS_JAR%
20 
21 @set PWD=%CD%
22 cd %OH%\bin
23 @set PATH=%OH%\bin;%PATH%
24 
25 if (%OHUC_TRACE%)==() (
26    @set OHUC_TRACE=8
27 )
28 @set OHUC_PROPERTY_DEFS=-DOHUC_TRACE=%OHUC_TRACE%
29 
30 %JRE% -DORACLE_HOME=%OH% -classpath "%CLASSPATH%" %OHUC_PROPERTY_DEFS% oracle.homeuserctl.orahomeuserctl %*
31 @set ORAHOMEUSERCTL_EXIT_STATUS=%ERRORLEVEL%
32 cd %PWD%
33 exit /B %ORAHOMEUSERCTL_EXIT_STATUS%

 

以上是关于oracle 12C SYS,SYSTEM用户的密码都忘记或是丢失的主要内容,如果未能解决你的问题,请参考以下文章

oracle 12c安装时没有修改sys口令,网页管理无法登录

如何查询Oracle中所有用户信息

Oracle12C创建scott账户

oracle 12c新建pdb实例

Windows下安装Oracle12C

在Oracle12c上添加了Scott用户,但是为啥再次进入的时候却显示invalid username/password;logon denied