Thứ Tư, 24 tháng 12, 2008

Oracle XE: Can't start listener

I connect to Oracle XE (on the desktop) from my laptop, and it had the error:
ERROR: ORA-12541: TNS: no listener
So I check the Oracle XE:
$ lsnrctl status
...
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=thuannm)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused

I've checked the listener.ora and tnsnames.ora, but there's no problem found. So I tried to start the Listener, and I got:
$ lsnrctl start
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
NL-00280: error creating log stream /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
NL-00278: cannot open log file
SNL-00016: snlfohd: error opening file
Linux Error: 13: Permission denied

From this error I knew that I didn't have write permission on the log file. After fixing this, I start the listener again, the error has changed :D
$ lsnrctl start
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Log messages written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12555: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00525: Insufficient privilege for operation
Linux Error: 1: Operation not permitted

This mean I can't start the TNS by the permission, after googling - lol - I found this:
$ sudo chown oracle.dba -R /var/tmp/.oracle/
And it works for me.

Không có nhận xét nào:

Đăng nhận xét