Questions about Oracle 12C PDB users cannot log on

Source: Internet
Author: User

Newly installed oracle12c, the new CDB and PDB users how to log on has been confused, after a night of search, finally resolved.

    1. Sqlplus/nolog-conn/as SYSDBA Login to Oracle

    2. Switch session to PDB under ALTER session set CONTAINER=PDBORCL

    3. CREATE table space Create tablespace tablespace_name datafile '/home/oracle/var/data/tablespace_name.dbf ' size 500m autoextend on;

    4. View table Spaces Select Tablespace_name,file_id,file_name from Dba_data_files;

    5. Create user table_name identified by password default tablespace tablespace_name;

    6. Grant DBA to toolbar user authorization;

    7. Commit commit;

    8. Conn Toolbar/[email protected]
      ERROR:
      Ora-01017:invalid Username/password; Logon denied

      Always unable to sign in

    9. Set Tns_admin

      Export Tns_admin=/home/oracle/app/oracle/product/12.1.0/dbhome_2/network/admin

      Still no solution

    10. 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

    11. 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

    12. Join in Tnsnames.ora

      PDBORCL =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
      (Connect_data =
      (SERVER = dedicated)
      (service_name = pdborcl.localdomain)
      )
      )

    13. Conn Toolbar/[email protected]
      Connected.

      Okay, OK.

      ^_^ have a good time.

Questions about Oracle 12C PDB users cannot log on

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.