In my case (for OracleExpress) the service was running, but I got this problem when trying to access the database via sqlplus without a connection identifier:
sqlplus sys/mypassword as sysdba
To make it work, I needed to add a connection identifier (XE for Oracle Express), so the following command worked fine:
sqlplus sys/mypassword@XE as sysdba
If you are still getting the ORA-12560, make sure you can execute the XE command. Using:
tnsping XE
And you should get an OK message along with the full connection string (the tnsping command is in the oracle installation directory: [oracle express install dir] \ app \ oracle \ product \ 11.2.0 \ server \ bin). If you cannot ping, make sure your tnsnames.ora file is available for sqlplus. You may need to set the TNS_ADMIN environment variable pointing to your ADMIN directory where the file is located, for example:
TNS_ADMIN=[oracle express installation dir]\app\oracle\product\11.2.0\server\network\ADMIN
walkeros Mar 14 '17 at 14:09 2017-03-14 14:09
source share