{"id":672,"date":"2012-10-09T04:13:48","date_gmt":"2012-10-09T11:13:48","guid":{"rendered":"https:\/\/gonzalo.aro.cl\/blog\/?p=672"},"modified":"2015-09-24T13:19:53","modified_gmt":"2015-09-24T17:19:53","slug":"ora-12505-tns-el-sid-es-desconocido","status":"publish","type":"post","link":"https:\/\/gonzalo.aro.cl\/blog\/2012\/10\/09\/ora-12505-tns-el-sid-es-desconocido\/","title":{"rendered":"ORA-12505: TNS: el SID es desconocido"},"content":{"rendered":"<p>Esto te puede ocurriral iniciar el listener de Oracle<\/p>\n<pre class=\"brush: bash\">\r\nlsnrctl start\r\n<\/pre>\n<p>o al intentar conectarte a  Oracle a trav\u00e9s de un cliente Oracle. Esto puede significar que no existan las <a href=\"https:\/\/gonzalo.aro.cl\/blog\/2012\/10\/09\/variables-de-entorno-oracle\/\" title=\"Variables de entorno Oracle\">variables de entorno<\/a>, sobre todo ORACLE_SID (SID, Service Identificator)<\/p>\n<p>Si esta configurado revisa dos archivos tnsnames.ora y\/o listener.ora. <\/p>\n<p>En el caso de tnsnames.ora, luego de crear la base de datos debiese existir una anotaci\u00f3n sobre el nombre y el protocolo que se utilizar\u00e1. Ejemplo<\/p>\n<pre class=\"brush: bash\">\r\nORCL =\r\n  (DESCRIPTION =\r\n    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))\r\n    (CONNECT_DATA =\r\n      (SERVER = DEDICATED)\r\n      (SERVICE_NAME = orcl)\r\n    )\r\n  )\r\n<\/pre>\n<p>Que en mi caso estaba correcto.<br \/>\nEn cambio al listener.ora le faltaba referenciar al SID orcl. Para hacerlo, se debe agregar dentro de la lista de listener, que en mi caso solo era este<\/p>\n<pre class=\"brush: bash\">\r\nSID_LIST_LISTENER =\r\n  (SID_LIST =\r\n    (SID_DESC =\r\n      (GLOBAL_DBNAME = orcl)\r\n      (ORACLE_HOME = \/u01\/app\/oracle\/product\/11.2\/db_1)\r\n      (SID_NAME = orcl)\r\n    )\r\n  )\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Esto te puede ocurriral iniciar el listener de Oracle lsnrctl start o al intentar conectarte a Oracle a trav\u00e9s de un cliente Oracle. Esto puede significar que no existan las variables de entorno, sobre todo ORACLE_SID (SID, Service Identificator) Si esta configurado revisa dos archivos tnsnames.ora y\/o listener.ora. En el caso de tnsnames.ora, luego de [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,16,4,15,9],"tags":[],"class_list":["post-672","post","type-post","status-publish","format-standard","hentry","category-base-de-datos","category-centos","category-desarrollo","category-linux","category-oracle"],"_links":{"self":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/672"}],"collection":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/comments?post=672"}],"version-history":[{"count":6,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/672\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/672\/revisions\/1064"}],"wp:attachment":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/media?parent=672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/categories?post=672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/tags?post=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}