FreeTDS User Guide: A Guide to Installing, Configuring, and Running FreeTDS | ||
---|---|---|
Prev | Chapter 8. Troubleshooting | Next |
First ping the host to make sure you can talk to the machine the server resides on.
A successful ping shows that your network isn't preventing you from reaching the machine hosting the server.Attempt to telnet to the port, to verify that the dataserver is listening.
Example 8-2. Finding the server
$ telnet myhost 1433 Trying 127.0.0.1... Connected to myhost. Escape character is '^]'.
tsql can be run in two ways, one which uses freetds.conf and one which connects directly using the host and port. First attempt a connection using host and port.
Example 8-3. Connecting to the server, bypassing freetds.conf
$ cd src/apps $ TDSVER=7.0 ./tsql -H myhost -p 1433 -U user
If you receive a message like
Msg. No.: 18450 Severity: 14 State: 1 Login failed- User: loginid Reason: Not defined as a valid user of a trusted SQL Server connectionSQL Server is accepting only "domain" logins. This applies only to Microsoft SQL Server and you'll need to have your DBA verify that "server logins" are allowed, or use a domain login.
Finally, if you received a prompt, then try tsql using the dataserver name.
If this fails, FreeTDS is either not finding your freetds.conf file, finding the wrong one, or there is an error in the file.[1] | To exit telnet: When connected, telnet's command mode may be entered by typing the telnet escape character (initially Ctrl-], as above). Once in command mode, telnet may be exited with the command quit. |