Wie eine Verbindung zu PDB in Oracle 12c

Ich verwende eine frische installation von Oracle 12c unter Solaris 10 und ich kann eine Verbindung zu der CDB mit toad ganz gut, bitte sagen Sie mir, wie kann ich jetzt eine Verbindung zu der PDB-Datenbank mit dem Namen PDBORCL wie bereits in der Anleitung: https://oracle-base.com/articles/12c/multitenant-connecting-to-cdb-and-pdb-12cr1

Folgenden sind die Inhalte meiner tnsnames.ora-Datei:

# tnsnames.ora Network Configuration File: /bkofa/oracle/app/oracle  

/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ORCL12 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = afxortsts)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl12)
    )
  )
pdbORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = afxortsts)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdborcl)
    )
  )

Hier der Inhalt meiner Zuhörer.ora-Datei:

# listener.ora Network Configuration File: /bkofa/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = afxortsts)(PORT = 1523))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcl12)
      (SID_NAME = orcl12)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = pdborcl)      
      (SID_NAME = pdborcl)
    )
  )

Diese werden die Container übrigens:

SELECT name, pdb    
FROM   v$services    
ORDER BY name;    

NAME              PDB    

SYS$BACKGROUND    CDB$ROOT    
SYS$USERS         CDB$ROOT    
orcl12            CDB$ROOT    
orcl12XDB         CDB$ROOT    
pdborcl           PDBORCL    

Immer noch, wenn ich versuche zu verbinden, PDB über eine beliebige Kombination von Befehlen dies ist, was ich bekomme:

bash-3.2$ lsnrctl status  

LSNRCTL for Solaris: Version 12.1.0.2.0 - Production on 13-APR-2016 15:42:28  

Copyright (c) 1991, 2014, Oracle.  All rights reserved.  

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=afxortsts)(PORT=1523)))  
STATUS of the LISTENER  
------------------------  
Alias                     LISTENER  
Version                   TNSLSNR for Solaris: Version 12.1.0.2.0 - Production  
Start Date                12-APR-2016 13:56:56  
Uptime                    1 days 1 hr. 45 min. 36 sec  
Trace Level               off  
Security                  ON: Local OS Authentication  
SNMP                      OFF  
Listener Parameter File   /bkofa/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora  
Listener Log File         /bkofa/oracle/app/oracle/diag/tnslsnr/afxortsts/listener/alert/log.xml  
Listening Endpoints Summary...  
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=afxortsts)(PORT=1523)))  
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))  
Services Summary...  
Service "orcl12" has 1 instance(s).  
  Instance "orcl12", status UNKNOWN, has 1 handler(s) for this service...  
Service "pdborcl" has 1 instance(s).  
  Instance "pdborcl", status UNKNOWN, has 1 handler(s) for this service...  
The command completed successfully  
bash-3.2$ sqlplus '/as sysdba'  

SQL*Plus: Release 12.1.0.2.0 Production on Wed Apr 13 15:42:44 2016  

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


Connected to:  
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production  
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options  

SQL> connect sys/[email protected]:1523/pdborcl as sysdba  
ERROR:  
ORA-01017: invalid username/password; logon denied  


Warning: You are no longer connected to ORACLE.  
SQL> connect sys@pdborcl  
Enter password:  
ERROR:  
ORA-01034: ORACLE not available  
ORA-27101: shared memory realm does not exist  
SVR4 Error: 2: No such file or directory  
Additional information: 2581  
Additional information: -2057892281  
Process ID: 0  
Session ID: 0 Serial number: 0  


SQL> connect [email protected]:1523/pdborcl as sysdba  
ERROR:  
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA  


SQL>  

Oh, ich sollte klar machen, dass ich mit port 1523, weil es ist eine andere Instanz von älteren Oracle 10g bereits auf dem system ausgeführt wird, die diesen port verwendet, damit wollte ich vermeiden jeden Konflikt mit.

  • Ich habe das gleiche problem, hast du es lösen?
InformationsquelleAutor Dashing Boy | 2016-04-15
Schreibe einen Kommentar