Newly installed oracle12c, the new CDB and PDB users how to log on has been confused, after a night of search, finally resolved.
Sqlplus/nolog-conn/as SYSDBA Login to Oracle
Switch session to PDB under ALTER session set CONTAINER=PDBORCL
CREATE table space Create tablespace tablespace_name datafile '/home/oracle/var/data/tablespace_name.dbf ' size 500m autoextend on;
View table Spaces Select Tablespace_name,file_id,file_name from Dba_data_files;
Create user table_name identified by password default tablespace tablespace_name;
Grant DBA to toolbar user authorization;
Commit commit;
Conn Toolbar/[email protected]
ERROR:
Ora-01017:invalid Username/password; Logon denied
Always unable to sign in
Set Tns_admin
Export Tns_admin=/home/oracle/app/oracle/product/12.1.0/dbhome_2/network/admin
Still no solution
Conn Toolbar/[email protected]
ERROR:
Ora-12514:tns:listener does not currently know of service requested in Connect
Descriptor
TNS error should be a problem with TNS scripting
-
View services and found that there should be a problem with the service name of PDBORCL
Select name,pdb from v$services;
name PDB
----- -------------------------------------------------------
pdborcl.localdomain PDBORCL
Orclxdb Cdb$root
orcl.localdomain cdb$root
sys$ background cdb$root
sys$users cdb$root
Join in Tnsnames.ora
PDBORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = pdborcl.localdomain)
)
)
Conn Toolbar/[email protected]
Connected.
Okay, OK.
^_^ have a good time.
Questions about Oracle 12C PDB users cannot log on