Open ozeta opened 9 years ago
vagrant@oracle:~$ cat /u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
[...]
and
vagrant@oracle:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 oracle oracle
So when logged in via vagrant, you have to use the following:
$ sqlplus system/manager@//oracle:1521/XE
If you are using JDBC on the host system, this URL also works for me: jdbc:oracle:thin:@localhost:1521/XE
.
For sqlplus on the host system, you must configure tnslistener.ora with localhost:1521
.
i finished the installation and ssh'd into the system, but i cannot open the db at address localhost:1521/XE. the address is un-reachable. is there something else to configure?
sudo service oracle-xe status says:
vagrant@oracle:~$ sudo service oracle-xe status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 21-NOV-2014 08:43:18
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production Start Date 21-NOV-2014 07:59:31 Uptime 0 days 0 hr. 43 min. 46 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Default Service XE Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "XE" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service... Service "XEXDB" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service... The command completed successfully