Wednesday 3 July 2013

ORA-12162 "TNS:net service name is incorrectly specified",

Hadn't seen this for a while and good reason.

After installing 12c locally and then closing down my system, I logged in tonight to play around.

What I had forgotten to do in my haste was set the ORACLE_SID, school boy error.

ORA-12162  "TNS:net service name is incorrectly specified"

export ORACLE_SID=orcl

A simple fix from a misleading error message which might have you looking at your tnsnames.ora

Configure 12c EM Express

If like me you somehow managed to install 12c and DBCA didn't give feedback on EM Express or you didn't save the details then fear not, you can retrieve the port and change it.

If its configured you can connect get the portnumber by running:

SQL > select dbms_xdb_config.gethttpsport() from dual;
Then connect : https://database-hostname:portnumber/em/

If the SQL returns no values then you need to set the port,

SQL > exec DBMS_XDB_CONFIG.SETHTTPSPORT(5500);

Then connect : https://database-hostname:portnumber/em/

(you will need flash player as well to use it, guess that means no ipad app !)