例外 ORA-12504 が発生します。TNS:listener was not given the SID in CONNECT_DATA 何が問題だったのか教えてください。 tnsnames.ora
SUNRISEDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SUNRISEDB)
)
)
リスナー.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = pacdcinfoddpodbc.cable.comcast.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\app\kkumar003c
そして私のJavaコードは
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
dbConn = DriverManager.getConnection("jdbc:oracle:thin:@147.191.10.119:1521","KIRANDB","KIRANDB");
System.out.println();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("db connection=="+dbConn);
}