I am trying to change oracle tnslsnr port number from default to some other port. After I change port number for tnslsnr from 1521 to 2000 I start geting ORA-12505, TNS:listener does not currently know of SID from JDBC driver. Everything works fine as long as port is 1521.
Content of my listener.ora file:
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 2000))
)
)
Content of my tnsnames.ora file:
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 2000))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb.localdomain)
)
)
JDBC URL I am trying to connect to: jdbc:oracle:thin:@testhost:2000:testdb
Database version is 12c, OS is CentOS 5.8