Oracle 12C ORA-65096: Invalid public user name or role name

Source: Internet
Author: User

First, the basic usage:

First press 11G before

Conn/as Sysdba;

Create user test identifed by test;

ORA-65096: The public user name or role name is not valid.

Check the official document that "trying to create a generic user, you need to use C # #或者c # #开头", when the heart will have doubts, what is common user? It doesn't matter if it's built first.

Create C # #user test identifed by test;

Created successfully

Sql>show Con_name;

Con_name

------------------------------

Cdb$root

selectcon_id,dbid,NAME,OPEN_MODEfromv$pdbs;



    CON_ID       DBID NAME                           OPEN_MODE ---------- ---------- ------------------------------ ----------
         2 4066409480 PDB$SEED                       READ ONLY
         3 2270995695 PDBORCL                        MOUNTED

Sql>alter session Set CONTAINER=PDBORCL;

Then use create user test identifed by test;

ORA-01219: The database is not open: Allow query resolution only in fixed tables/views!

Ora-01219:database not open:queries allowed on fixed tables/views only

"ORA-01219: Database not open: Only allow query in fixed table/view" Warning window!

Workaround:

Log in to Oracle Sql*plus

C:\users\administrator>
C:\users\administrator>sqlplus/nolog

Sql*plus:release 10.2.0.1.0-production on Tuesday January 29 10:54:36 2013

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Sql> Connect Sys/sys as Sysdba


This section is to find out the error when opening the database

Sql> select Open_mode from V$database;

Open_mode
----------
Mounted

sql> ALTER DATABASE open;
ALTER DATABASE Open
*
ERROR at line 1:
Ora-01157:cannot identify/lock data file 4-see DBWR trace file
Ora-01110:data file 4: '/DATA/APP/ORADATA/ORA237/USERS01.DBF '



This is about the '/data/app/oradata/ora237/users01.dbf ' file problem.

All we have to do is erase this residue file.

Proceed to the next step:

sql> ALTER DATABASE datafile '/DATA/APP/ORADATA/ORA237/USERS01.DBF ' offline drop;

Database altered.

sql> ALTER DATABASE open;

Database altered.

Oracle 12C ORA-65096: Invalid public user name or role name

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.