I have installed oracle 12c in my ubuntu. I assume the user is not created at all.
您已将12c数据库创建为容器.现在,当示例模式驻留在可插拔数据库中时,您可能正在连接到容器数据库.
最常见的误解是关于“SQLPLUS / AS SYSDBA”的用法.
由于我们已经选中了创建单个CDB的选项,因此“SQLPLUS / AS SYSDBA”命令将始终登录到CDB.通常开发人员在以SYSDBA身份登录后直接解锁“SCOTT / HR”帐户.但这是诀窍:
“SCOTT,HR”和其他样本模式在PDB中,而不在CDB中.因此,您需要以sysdba身份登录到PDB.
例如,
sqlplus SYS/password@PDBORCL AS SYSDBA
SQL> ALTER USER scott ACCOUNT UNLOCK IDENTIFIED BY tiger;
sqlplus scott/tiger@pdborcl
SQL> show user;
USER is "SCOTT"
UDPATE似乎OP尚未安装示例模式.它可以手动完成或通过DBCA完成.
您需要运行hr_main.sql脚本.创建人力资源(HR)模式所需的所有脚本都位于$ORACLE_HOME / demo / schema / human_resources中.
Installing the HR Schema
All scripts necessary to create the Human Resource (HR) schema reside
in $ORACLE_HOME/demo/schema/human_resources.
You need to call only one script, hr_main.sql, to create all the
objects and load the data
Running hr_main.sql accomplishes the following tasks:
Removes any previously installed HR schema
Creates user HR and grants the necessary privileges
Connects as HR
Calls the scripts that create and populate the schema objects