安装oracle 19c的步骤参考:Database Installation Guide for Linux
创建数据库实例
默认开机启动
执行完成后下面的自动配置脚本后,没有任何地方设置过密码。
# /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>