安装完oracle,然后执行完下面的自动配置脚本后,没有任何地方设置过密码。

# /etc/init.d/oracledb_ORCLCDB-19c configure

    在这个命令执行完成后,会提醒查看完整日志的地方:

    Look at the log file “/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log” for further details.
    Database configuration completed successfully. The passwords were auto generated,
    you must change them by connecting to the database using ‘sqlplus / as sysdba’ as the oracle user.

    然后执行sqlplus / as sysdba,死活登录不上去,网上各种密码都试过了。查看该日志:/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log 上面只有个SID的名字,也没有什么密码信息。。

    最后发现别人说了using ‘sqlplus / as sysdba’ as the oracle user。 我一直用的root用户。。su oracle 后就可以了, Enter password 的密码是 change_on_install

    [root@localhost dbhome_1]# su oracle
    [oracle@localhost dbhome_1]$ sqlplus
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Nov 4 21:42:22 2019
    Version 19.3.0.0.0
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    Enter user-name: sys / as sysdba
    Enter password: 
    Connected to an idle instance.
    SQL> 
    

    linux下查看用户:cut -d : -f 1 /etc/passwd 要从root用户切换到oracle用户,然后oracle用户没有密码 然后执行sqlplus,输入sys /as sysdba,没有密码,即可连接上oralce

    Logo

    魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

    更多推荐