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
  1. (*) 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?


E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy