Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create a user in oracle 12c

Tags:

sql

oracle

ddl

i want to create a user in oracle 12c but i have a problem.after i enter my user name and psw, this warning displatyed: ORA-65096: invalid common user or role name

like image 679
Mojtaba Qanbari Avatar asked Oct 12 '18 09:10

Mojtaba Qanbari


People also ask

What is common user in Oracle 12c?

A common user is a database user that has the same identity in the root and in every existing and future pluggable database (PDB). Every common user can connect to and perform operations within the root, and within any PDB in which it has privileges. Every common user is either Oracle-supplied or user-created.

What is Oracle user creation?

The CREATE USER statement allows you to create a new database user which you can use to log in to the Oracle database.

Can we create user in CDB?

In a CDB, the requirements for a user name are as follows: In Oracle Database 12c Release 1 (12.1. 0.1), the name of a common user must begin with C## or c## and the name of a local user must not begin with C## or c## .


1 Answers

If you see this error then first you need to alter the session for oracle 12c:

alter session set "_ORACLE_SCRIPT"=true; 

after running above command you can create the user. it will work for sure.

CREATE USER your_username IDENTIFIED BY your_password;
like image 89
Govind Gupta Avatar answered Oct 04 '22 20:10

Govind Gupta