<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MacLochlainns Weblog &#187; TNS-03505</title>
	<atom:link href="http://blog.mclaughlinsoftware.com/tag/tns-03505/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mclaughlinsoftware.com</link>
	<description>Michael McLaughlin's Technical Blog</description>
	<lastBuildDate>Mon, 06 Sep 2010 21:21:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Oracle networking &#8211; some ugly ducklings</title>
		<link>http://blog.mclaughlinsoftware.com/2008/10/24/oracle-networking-some-ugly-duckings/</link>
		<comments>http://blog.mclaughlinsoftware.com/2008/10/24/oracle-networking-some-ugly-duckings/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 16:18:36 +0000</pubDate>
		<dc:creator>maclochlainn</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ORA-12518]]></category>
		<category><![CDATA[ORA-12560]]></category>
		<category><![CDATA[TNS-03505]]></category>
		<category><![CDATA[TNS-12170]]></category>

		<guid isPermaLink="false">http://maclochlainn.wordpress.com/?p=639</guid>
		<description><![CDATA[I tried to answer a question in the forum a couple weeks ago about connections. It contained all the trite stuff about check this, then that, et cetera because I couldn't remember why I'd seen an TNS-03505 error. It returns an illustrative message "Failed to resolve name" error. Along the way, I tripped into ORA-12560 and one I'd never seen before an ORA-12518. If you want the dirt on these read on [...]]]></description>
			<content:encoded><![CDATA[<p>I tried to answer a question in the forum a couple weeks ago about connections. It contained all the trite stuff about check this, then that, et cetera because I couldn&#8217;t remember why I&#8217;d seen an TNS-03505 error. It returns an illustrative message &#8220;<em>Failed to resolve name</em>&#8221; error. Along the way, I tripped into <code>ORA-12560</code> and one I&#8217;d never seen before an <code>ORA-12518</code>. If you want the dirt on these read on &#8230;</p>
<p><strong><code>TNS-03505</code></strong><br />
You&#8217;ll typically encounter this error when you&#8217;re working on a laptop. It gets triggered when you run the <code>tnsping</code> utility. When you&#8217;ve qualified the hostname and <code>hostname.domain</code> name in the hosts file and in the <code>tnsnames.ora</code> file, it&#8217;ll throw the <code>TNS-03505</code> error because you&#8217;re on another network. You may also encounter it when there&#8217;s a change or discrepancy between the machine hostname and DNS server results. Lastly, you may encounter it when you&#8217;ve lost the lease on an IP address and now have a new lease with a different IP address.</p>
<p>These errors effectively block successful <code>tnsping</code> calls. You get around it by shutting down the listener, modifying the IP address in the <code>tnsnames.ora</code> file if you&#8217;re not using a hostname, setting the <code>%TNS_ADMIN%</code> environment variable in a command session when you have multiple Oracle homes, and restarting the listener.</p>
<p><strong><code>TNS-12533</code></strong><br />
This is an doubly annoying error because while it can occur for a meaningful reasons like fat fingering a key word in the <code>ADDRESS</code> descriptor, it can be a stray tab character. That&#8217;s why the error text is: <code>TNS:illegal ADDRESS parameters</code></p>
<p>In <code>vi</code> or <code>vim</code>, you can see hidden characters by typing the <code>:</code> (colon), and enabling list. List shows you hidden characters, like the <code>$</code> for line returns, et cetera. You run it like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">:<span style="color: #000000; font-weight: bold;">set</span> list</pre></div></div>

<p>If you see a stray tab character, <code>^I</code>, remove it and the error should go away. You can disable list by setting <code>nolist</code>.</p>
<p><strong><code>ORA-12170</code></strong><br />
This is generally an easy fix. It typically means that the listener can&#8217;t be found. The most frequent cause of the error is a generic installation of the Oracle database or client on a DHCP configured laptop. If there&#8217;s no <code>hostname</code> to IP address map defined in the <code>/etc/hosts</code> (Linux or Unix) or the <code>C:\WINDOWS\system32\drivers\etc\hosts</code> file, the installation uses the current IP number. You typically see this error after you&#8217;ve fixed your Oracle listener that wouldn&#8217;t start by replacing the IP address with a <code>hostname</code>, which is done in the <code>listener.ora</code> file. Unfortunately, you also need to change the same thing in the <code>tnsnames.ora</code> file.</p>
<p>When you connect your laptop to another network, a <code>TNS-12170</code> exception is thrown. You can fix it by replacing the <code>(HOST = nnn.nnn.nnn.nnn)</code> with the machine name, like <code>(HOST = some_hostname)</code>.</p>
<p><strong><code>ORA-12500</code></strong><br />
This one generally has two causes. First, when the service was created by somebody other than the Administrator, which can be a user with Administrator role but not in the Administrator group. Second, when the machine doesn&#8217;t have enough physical or virtual memory to spawn a new dedicated process.</p>
<p><strong><code>ORA-12514</code></strong><br />
This one states that Oracle Listener can&#8217;t find the connect descriptor. You get an error like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">ORA<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">12514</span>: TNS:listener does <span style="color: #993333; font-weight: bold;">NOT</span> currently know of service requested <span style="color: #993333; font-weight: bold;">IN</span> connect descriptor</pre></div></div>

<p>The <code>ORA-12514</code> typically means that the Oracle Listener is running but that Oracle on a Linux or Unix machine, or the Oracle Service on a Windows machine is not started.</p>
<p><strong><code>ORA-12518</code></strong><br />
This one is cute. I only hit it because my touchpad is too sensitive on the Dell laptop. It occurs if you pause the Windows listener service. You fix it by restarting the service. It is an enigma within a conundrum (Churchill on the old Soviet Union) why anybody would create a service like this with a pause option. Wouldn&#8217;t it be cool if somebody at Oracle were listening now (that is reading this blog) and they got the service fixed.</p>
<p><strong><code>ORA-12541</code></strong><br />
This typically means one of two things, which depends on the text of the error. It generally returns either a <code>"no listener"</code> or <code>"could not resolve the connect identifier specified"</code> message text.</p>
<p>The former means the listener isn&#8217;t running or can&#8217;t be found by the Oracle Instant Client software. If the listener isn&#8217;t running, you can start it with the <code>lsnrctl</code> utility, or in Windows by starting the service.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># lsnrctl start</span></pre></div></div>

<p>When the listener is running but isn&#8217;t seen by an Oracle Instant Client installation or another database through a database link, you probably have a firewall rule in place blocking the port that is listening for incoming traffic. Check your server firewall rules.</p>
<p>The latter error means <code>sqlplus</code> can&#8217;t find the <code>tnsnames.ora</code> file. Oracle checks for the <code>tnsnames.ora</code> file in the present working directory, then the location of the <code>$TNS_ADMIN</code> directory (or Windows <code>%TNS_ADMIN%</code>), and finally the location of the <code>$ORACLE_HOME/network/admin</code> directory. If you&#8217;re getting this error in a PHP configuration, like a CGI mode, put a copy of the <code>tnsnames.ora</code> file in the same directory as the <code>php-cgi.exe</code> file. Alternatively, you can define the following in your <code>httpd.conf</code> file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SetEnv TNS_ADMIN <span style="color: #ff0000;">&quot;tns_admin_directory&quot;</span></pre></div></div>

<p><strong><code>ORA-12560</code></strong><br />
This is the sqlplus utility cousin of the <code>TNS-03505</code>. All the rules that apply to it apply to this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mclaughlinsoftware.com/2008/10/24/oracle-networking-some-ugly-duckings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
