{"id":3671,"date":"2014-04-15T00:11:00","date_gmt":"2014-04-14T22:11:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/"},"modified":"2014-04-15T00:11:00","modified_gmt":"2014-04-14T22:11:00","slug":"oracle-and-tnsadmin-issues","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/","title":{"rendered":"Oracle TNS_ADMIN issues due to bad environment settings"},"content":{"rendered":"<p>Recently, I faced a\u00a0TNS resolution problem at a customer. The reason was a bad environment setting: The customer called the service desk because of a DBLINK pointing to a bad database.<\/p>\n<p>The users were supposed to be redirected to a development database, and the DBLINK was redirecting to a validation database instead. The particularity of the environment is that development and validation databases are running on the same server, but on different Oracle homes, each home having its own tnsnames.ora. Both tnsnames.ora contain common alias names, but pointing on different databases. Not exactly best practice, but this is not the topic here.<\/p>\n<p>The problem started with some issues to reproduce the case. Our service desk was not able to reproduce the situation without understanding that the customer was trying to access the database remotely via a development tool (through the listener), while we were connected locally on the server.<\/p>\n<p>Let me present the case with my environment.<br \/>\nFirst, this is the database link concerned by the issue:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; select * from dba_db_links;\nOWNER\u00a0\u00a0\u00a0\u00a0\u00a0 DB_LINK\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 USERNAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 HOST\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CREATED\n---------- -------------------- ------------------------------ ---------- ---------\nPUBLIC\u00a0\u00a0\u00a0\u00a0 DBLINK\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DBLINK\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MYDB\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 21-MAR-14<\/pre>\n<p>And this is the output when we try to display the instance name through the DBLINK, when connected locally:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; select instance_name from v$instance@DBLINK;\nINSTANCE_NAME\n----------------\nDB2<\/pre>\n<p>The user is redirected on the remote database, as expected. Now, let&#8217;s see what happens when connected using the SQL*Net layer:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle@srvora01 ~]$ sqlplus system@DB1\nSQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 24 10:07:45 2014\nCopyright (c) 1982, 2011, Oracle.\u00a0 All rights reserved.\n\u00a0\nEnter password:\n\u00a0\nConnected to:\n\u00a0\nOracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production\nWith the Partitioning, OLAP, Data Mining and Real Application Testing options\n\u00a0\nSQL&gt; select instance_name from v$instance@DBLINK;\nINSTANCE_NAME\n----------------\nDB1<\/pre>\n<p>Here we can see that the user is not redirected to the same database (here, for demonstration puproses, on the database itself).<br \/>\nThe first thing to check is the TNS_ADMIN variable, if it exists:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle@srvora01 ~]$ echo $TNS_ADMIN\n\/u00\/app\/oracle\/product\/11.2.0\/db_3_0\/network\/admin<\/pre>\n<p>There is the content of the tnsnames.ora file on that location:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle@srvora01 ~]$ cat \/u00\/app\/oracle\/product\/11.2.0\/db_3_0\/network\/admin\/tnsnames.ora\nDB1 =\n\u00a0 (DESCRIPTION =\n\u00a0\u00a0\u00a0 (ADDRESS = (PROTOCOL = tcp)(HOST = srvora01)(PORT = 1521))\n\u00a0\u00a0\u00a0 (CONNECT_DATA =\n\u00a0\u00a0\u00a0\u00a0\u00a0 (SERVER = DEDICATED)\n\u00a0\u00a0\u00a0\u00a0\u00a0 (SERVICE_NAME = DB1)\n\u00a0\u00a0\u00a0 )\n\u00a0 )\nMYDB =\n\u00a0 (DESCRIPTION =\n\u00a0\u00a0\u00a0 (ADDRESS = (PROTOCOL = tcp)(HOST = srvora01)(PORT = 1521))\n\u00a0\u00a0\u00a0 (CONNECT_DATA =\n\u00a0\u00a0\u00a0\u00a0\u00a0 (SERVICE_NAME = DB2)\n\u00a0\u00a0\u00a0 )\n\u00a0 )<\/pre>\n<p>&nbsp;<\/p>\n<p>Clearly, we have a problem with the TNS resolution. The local connection resolves the MYDB alias correctly, while the remote connection resolves a different database with the alias. In this case, we have two solutions:<\/p>\n<ul>\n<li>The tnsnames.ora is not well configured: this is not the case, as you can see above<\/li>\n<li>Another tnsnames.ora file exists somewhere on the server and is used by remote connections<\/li>\n<\/ul>\n<p>To confirm that the second hypothesis is the good one, we can use the strace tool:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; set define #\nSQL&gt; select spid from v$process p join v$session s on p.addr=s.paddr and s.sid=sys_context('userenv','sid');\nSPID\n------------------------\n5578\n\u00a0\nSQL&gt;\u00a0 host strace -e trace=open -p #unix_pid &amp; echo $! &gt; .tmp.pid\nEnter value for unix_pid: 5578\nSQL&gt; Process 5578 attached - interrupt to quit\n\u00a0\nSQL&gt; select instance_name from v$instance @ DBLINK;\nopen(\"\/u00\/app\/oracle\/product\/11.2.0\/db_3_0\/network\/admin\/tnsnames.ora\", O_RDONLY) = 8\nopen(\"\/etc\/host.conf\", O_RDONLY)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 8\nopen(\"\/etc\/resolv.conf\", O_RDONLY)\u00a0\u00a0\u00a0\u00a0\u00a0 = 8\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 8\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 8\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 8\nopen(\"\/etc\/passwd\", O_RDONLY|O_CLOEXEC) = 10\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 10\nopen(\"\/etc\/hostid\", O_RDONLY)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = -1 ENOENT (No such file or directory)\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 10INSTANCE_NAME\n----------------\nDB2<\/pre>\n<p>The DBLINK is resolved using the file \/u00\/app\/oracle\/product\/11.2.0\/db_3_0\/network\/admin\/tnsnames.ora.<br \/>\nNow, when connected remotely:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; set define #\nSQL&gt; select spid from v$process p join v$session s on p.addr=s.paddr and s.sid=sys_context('userenv','sid');\nSPID\n------------------------\n6838\n\u00a0\nSQL&gt; host strace -e trace=open -p #unix_pid &amp; echo $! &gt; .tmp.pid\nEnter value for unix_pid: 6838\nSQL&gt; Process 6838 attached - interrupt to quit\n\u00a0\nSQL&gt; select instance_name from v$instance@DBLINK;\nopen(\"\/u00\/app\/oracle\/network\/admin\/tnsnames.ora\", O_RDONLY) = 8\nopen(\"\/etc\/host.conf\", O_RDONLY)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 8\nopen(\"\/etc\/resolv.conf\", O_RDONLY)\u00a0\u00a0\u00a0\u00a0\u00a0 = 8\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 8\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 8\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 8\nopen(\"\/etc\/passwd\", O_RDONLY|O_CLOEXEC) = 9\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 9\nopen(\"\/etc\/hostid\", O_RDONLY)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = -1 ENOENT (No such file or directory)\nopen(\"\/etc\/hosts\", O_RDONLY|O_CLOEXEC)\u00a0 = 9INSTANCE_NAME\n----------------\nDB1<\/pre>\n<p>Here the DBLINK is resolved with the file \/u00\/app\/oracle\/network\/admin\/tnsnames.ora.<\/p>\n<p>Two different tnsnames.ora files are used according to the connection method! If we query the content of the second tnsnames.ora, we have an explanation for our problem:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle@srvora01 ~]$ cat \/u00\/app\/oracle\/network\/admin\/tnsnames.ora\nMYDB =\n\u00a0 (DESCRIPTION =\n\u00a0\u00a0\u00a0 (ADDRESS = (PROTOCOL = tcp)(HOST = srvora01)(PORT = 1521))\n\u00a0\u00a0\u00a0 (CONNECT_DATA =\n\u00a0\u00a0\u00a0\u00a0\u00a0 (SERVICE_NAME = DB1)\n\u00a0\u00a0\u00a0 )\n\u00a0 )<\/pre>\n<p>It is not clearly documented by Oracle, but the database session can inherit the environment variables in three different ways:<\/p>\n<ul>\n<li>When you connect locally to the server (no SQL*Net, no listener), the Oracle session inherits the client environment<\/li>\n<li>When you connect remotely to a service statically registered on the listener, the Oracle session inherits the environment which started the listener<\/li>\n<li>When you connect remotely to a service dynamically registered on the listener, the Oracle session inherits the environment which started the database<\/li>\n<\/ul>\n<p>In our case, the database was restarted with the wrong TNS_NAMES value set. Then, the database registered this value for remote connections. We can check this with the following method:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle @ srvora01 ~]$ ps -ef | grep pmon\noracle\u00a0\u00a0\u00a0 3660\u00a0\u00a0\u00a0\u00a0 1\u00a0 0 09:02 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 00:00:00 ora_pmon_DB1\noracle\u00a0\u00a0\u00a0 4006\u00a0\u00a0\u00a0\u00a0 1\u00a0 0 09:05 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 00:00:00 ora_pmon_DB2\noracle\u00a0\u00a0\u00a0 6965\u00a0 3431\u00a0 0 10:44 pts\/1\u00a0\u00a0\u00a0 00:00:00 grep pmon\n\u00a0\n[oracle @ srvora01 ~]$ strings \/proc\/3660\/environ | grep TNS_ADMIN\nTNS_ADMIN=<span style=\"color: #ff0000\">\/u00\/app\/oracle\/network\/admin<\/span><\/pre>\n<p><em>Note that we can get the value for TNS_ADMIN using the dbms_system.get_env.<\/em><\/p>\n<p>The solution was to restart the database with the correct TNS_ADMIN value:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle @ srvora01 ~]$ echo $TNS_ADMIN\n<span style=\"color: #ff0000\">\/u00\/app\/oracle\/product\/11.2.0\/db_3_0\/network\/admin<\/span>\n\u00a0\n[oracle@srvora01 ~]$ sqlplus \/ as sysdba\n\u00a0\nSQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 24 10:46:03 2014\n\u00a0\nCopyright (c) 1982, 2011, Oracle.\u00a0 All rights reserved.\n\u00a0\n\u00a0\nConnected to:\n\u00a0\nOracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production\nWith the Partitioning, OLAP, Data Mining and Real Application Testing options\n\u00a0\nSQL&gt; shutdown immediate;\nDatabase closed.\nDatabase dismounted.\nORACLE instance shut down.\n\u00a0\nSQL&gt; startup\nORACLE instance started.Total System Global Area 1570009088 bytes\nFixed Size\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2228704 bytes\nVariable Size\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1023413792 bytes\nDatabase Buffers\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 536870912 bytes\nRedo Buffers\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7495680 bytes\nDatabase mounted.\nDatabase opened.\n\u00a0\n[oracle@srvora01 ~]$ ps -ef | grep pmon\noracle\u00a0\u00a0\u00a0 4006\u00a0\u00a0\u00a0\u00a0 1\u00a0 0 09:05 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 00:00:00 ora_pmon_DB2\noracle\u00a0\u00a0\u00a0 7036\u00a0\u00a0\u00a0\u00a0 1\u00a0 0 10:46 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 00:00:00 ora_pmon_DB1\noracle\u00a0\u00a0\u00a0 7116\u00a0 3431\u00a0 0 10:46 pts\/1\u00a0\u00a0\u00a0 00:00:00 grep pmon\n\u00a0\n[oracle@srvora01 ~]$ strings \/proc\/7036\/environ | grep TNS_ADMIN\nTNS_ADMIN=<span style=\"color: #ff0000\">\/u00\/app\/oracle\/product\/11.2.0\/db_3_0\/network\/admin<\/span><\/pre>\n<p>The value for TNS_ADMIN is now correct.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">[oracle@srvora01 ~]$ sqlplus system @ DB1\n\u00a0\nSQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 24 10:47:21 2014\n\u00a0\nCopyright (c) 1982, 2011, Oracle.\u00a0 All rights reserved.Enter password:\n\u00a0\nEnter password:\n\u00a0\nConnected to:\n\u00a0\nOracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production\nWith the Partitioning, OLAP, Data Mining and Real Application Testing options\n\u00a0\nSQL&gt; select instance_name from v$instance @ DBLINK;\nINSTANCE_NAME\n----------------\nDB2<\/pre>\n<p>Remote connections are now using the right tnsnames.ora.<br \/>\nI hope this will help you with your TNS resolution problems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I faced a\u00a0TNS resolution problem at a customer. The reason was a bad environment setting: The customer called the service desk because of a DBLINK pointing to a bad database. The users were supposed to be redirected to a development database, and the DBLINK was redirecting to a validation database instead. The particularity of [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198],"tags":[17,442,44],"type_dbi":[],"class_list":["post-3671","post","type-post","status-publish","format-standard","hentry","category-database-management","tag-oracle-11g","tag-tns-resolution","tag-troubleshooting"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Oracle TNS_ADMIN issues due to bad environment settings - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle TNS_ADMIN issues due to bad environment settings\" \/>\n<meta property=\"og:description\" content=\"Recently, I faced a\u00a0TNS resolution problem at a customer. The reason was a bad environment setting: The customer called the service desk because of a DBLINK pointing to a bad database. The users were supposed to be redirected to a development database, and the DBLINK was redirecting to a validation database instead. The particularity of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-14T22:11:00+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Oracle TNS_ADMIN issues due to bad environment settings\",\"datePublished\":\"2014-04-14T22:11:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/\"},\"wordCount\":587,\"commentCount\":0,\"keywords\":[\"Oracle 11g\",\"TNS resolution\",\"Troubleshooting\"],\"articleSection\":[\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/\",\"name\":\"Oracle TNS_ADMIN issues due to bad environment settings - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2014-04-14T22:11:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-and-tnsadmin-issues\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle TNS_ADMIN issues due to bad environment settings\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/oracle-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle TNS_ADMIN issues due to bad environment settings - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/","og_locale":"en_US","og_type":"article","og_title":"Oracle TNS_ADMIN issues due to bad environment settings","og_description":"Recently, I faced a\u00a0TNS resolution problem at a customer. The reason was a bad environment setting: The customer called the service desk because of a DBLINK pointing to a bad database. The users were supposed to be redirected to a development database, and the DBLINK was redirecting to a validation database instead. The particularity of [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/","og_site_name":"dbi Blog","article_published_time":"2014-04-14T22:11:00+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Oracle TNS_ADMIN issues due to bad environment settings","datePublished":"2014-04-14T22:11:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/"},"wordCount":587,"commentCount":0,"keywords":["Oracle 11g","TNS resolution","Troubleshooting"],"articleSection":["Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/","name":"Oracle TNS_ADMIN issues due to bad environment settings - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2014-04-14T22:11:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-and-tnsadmin-issues\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle TNS_ADMIN issues due to bad environment settings"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=3671"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3671\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=3671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=3671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=3671"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=3671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}