Oracle-Datenbank ist 12c,Wie schreibe ich jdbc URL?
ich Java verwenden und schreiben wie url = jdbc:oracle:thin:@//192.168.203.10:1521/pdbcems
,
aber Fehler
java.sql.SQLRecoverableException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
Meine PDBS wie diese erhalten,
SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
CON_ID DBID NAME OPEN_MODE
ist
2 510431291 PDB$SEED READ ONLY
3 1955806753 PDBORCL MOUNTED
4 2032327615 PDBCEMS MOUNTED
und lsnrctl ist wie diese,
[email protected]:~$ lsnrctl status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.203.10) (PORT=1521)))
STATUS of the LISTENER
------------------------
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.203.10)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=trace)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "orcl.localdomain.trace" has 1 instance(s).
Instance "yz", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain.trace" has 1 instance(s).
Instance "yz", status READY, has 1 handler(s) for this service...
Service "pdbcems.localdomain.trace" has 1 instance(s).
Instance "yz", status READY, has 1 handler(s) for this service...
Service "pdborcl.localdomain.trace" has 1 instance(s).
Instance "yz", status READY, has 1 handler(s) for this service...
The command completed successfully
ich nicht der Weg, um dieses Problem zu lösen gibt.
wie Sie die url
Zeichenfolge schreiben.
URL-Syntax ist hier: http://docs.oracle.com/cd/B28359_01/java.11/b31224/urls.htm#BEIDHCBA. Dein Aussehen sieht gut aus; kann nicht sagen, welche Anmeldeinformationen Sie übergeben haben. – duffymo
Welcher Dienstname wird von 'select name, con_name von v $ active_services' für den PDB gemeldet, mit dem Sie eine Verbindung herstellen möchten? –