|
1.5 Is Anybody Listening?
If you want to connect to your database with the thin JDBC driver, then your database listener must listen on a TCP/IP port. If you belong to the GUI-challenged group of Unix users, you can achieve this by editing your $ORACLE_HOME/work/listener.ora file, adding an additional line to:
LISTENER = (ADDRESS_LIST=
(ADDRESS=(PROTOCOL=ipc)(KEY=oracle-sid)) )
as follows:
LISTENER = (ADDRESS_LIST=
(ADDRESS=(PROTOCOL=ipc)(KEY=oracle-sid))
(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=port)) )
Now you must stop and then re-start your listener to pick up the new settings:
lsnrctl stop; lsnrctl start
- (*) Get your database listener to listen to a TCP/IP port. Write a SQLJ program that connects to this port using the thin driver and run it. What error is reported if there is no listener on the specified TCP/IP port?

|