JezK
Edit File: serverthere.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Is the server there?</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="troubleshooting.html" title="Chapter 8. Troubleshooting" /><link rel="prev" href="troubleshooting.html" title="Chapter 8. Troubleshooting" /><link rel="next" href="logging.html" title="Logging" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Is the server there?</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="troubleshooting.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Troubleshooting</th><td width="20%" align="right"> <a accesskey="n" href="logging.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="serverthere"></a>Is the server there?</h2></div></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="serverthere.ping"></a>Start with <span class="command"><strong>ping</strong></span></h3></div></div></div><p>First <span class="command"><strong>ping</strong></span> the host to make sure you can talk to the machine the server resides on. </p><div class="example"><a id="e.g.troubleshooting.ping"></a><p class="title"><strong>Example 8.1. Finding the server's host</strong></p><div class="example-contents"><pre class="screen"> <code class="prompt">$ </code><strong class="userinput"><code>ping -c1 <em class="replaceable"><code>myhost</code></em></code></strong> <code class="computeroutput">PING myhost (127.0.0.1) from 127.0.0.1 : 56(84) bytes of data. 64 bytes from myhost (127.0.0.1): icmp_seq=0 ttl=255 time=250 usec</code></pre></div></div><p><br class="example-break" /> A successful ping shows that your network isn't preventing you from reaching the machine hosting the server.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="serverthere.telnet"></a>Test with <span class="command"><strong>telnet</strong></span></h3></div></div></div><p>Attempt to <span class="command"><strong>telnet</strong></span> to the port, to verify that the servername is listening. </p><div class="example"><a id="e.g.troubleshooting.telnet"></a><p class="title"><strong>Example 8.2. Finding the server</strong></p><div class="example-contents"><pre class="screen"> <code class="prompt">$ </code><strong class="userinput"><code>telnet <em class="replaceable"><code>myhost 1433</code></em></code></strong> <code class="computeroutput">Trying 127.0.0.1... Connected to myhost. Escape character is '^]'. </code></pre></div></div><p><br class="example-break" /> If you get output as above, the servername is listening. If you get a 'Connection Refused' message, you're talking to the wrong host, wrong port, or the servername is down. <a href="#ftn.idm3317" class="footnote" id="idm3317"><sup class="footnote">[24]</sup></a></p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="serverthere.tsql"></a>Test with <span class="command"><strong>tsql</strong></span></h3></div></div></div><p><span class="command"><strong>tsql</strong></span> can be run in two ways, one which uses <code class="filename">freetds.conf</code> and one which connects directly using the host and port. First attempt a connection using host and port. </p><div class="example"><a id="e.g.troubleshooting.tsql.noconf"></a><p class="title"><strong>Example 8.3. Connecting to the server, bypassing <code class="filename">freetds.conf</code></strong></p><div class="example-contents"><pre class="screen"> <code class="prompt">$ </code><strong class="userinput"><code>cd src/apps</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>TDSVER=auto ./tsql -H <em class="replaceable"><code>myhost</code></em> -p <em class="replaceable"><code>1433</code></em> -U <em class="replaceable"><code>user</code></em></code></strong></pre></div></div><p><br class="example-break" /> If you receive a message of 'Login Failed.' then your connectivity is OK, but you have a authentication issue.</p><p>If you receive a message like </p><pre class="screen"> <code class="computeroutput">Msg. No.: 18450 Severity: 14 State: 1 Login failed- User: loginid Reason: Not defined as a valid user of a trusted Microsoft SQL Server connection </code></pre><p> <span class="productname">Microsoft SQL Server</span> is accepting only <span class="quote">“<span class="quote">domain</span>”</span> logins. This applies only to Microsoft <span class="productname">SQL Server</span> and you'll need to have your DBA verify that <span class="quote">“<span class="quote">server logins</span>”</span> are allowed, or use a <a class="link" href="domains.html" title="Domain Logins">domain login</a>.</p><p>Finally, if you received a prompt, then try <span class="command"><strong>tsql</strong></span> using the servername. </p><div class="example"><a id="e.g.troubleshooting.tsql"></a><p class="title"><strong>Example 8.4. Connecting to the server using <code class="filename">freetds.conf</code></strong></p><div class="example-contents"><pre class="screen"> <code class="prompt">$ </code><strong class="userinput"><code>./tsql -S <em class="replaceable"><code>myserver</code></em> -U <em class="replaceable"><code>user</code></em></code></strong></pre></div></div><p><br class="example-break" /> If this fails, <span class="productname">FreeTDS</span> is either not finding your <code class="filename">freetds.conf</code> file, finding the wrong one, or there is an error in the file.</p></div><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div id="ftn.idm3317" class="footnote"><p><a href="#idm3317" class="para"><sup class="para">[24] </sup></a>To exit <span class="command"><strong>telnet</strong></span>: When connected, telnet's command mode may be entered by typing the telnet <em class="firstterm">escape character</em> (initially <span class="keysym">Ctrl</span>-<span class="keysym">]</span>, as above). Once in command mode, <span class="command"><strong>telnet</strong></span> may be exited with the command <span class="command"><strong>quit</strong></span>. </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="troubleshooting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="troubleshooting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="logging.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. Troubleshooting </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Logging</td></tr></table></div></body></html>