Error 20009 (severity 9):Unable to connect: Adaptive Server is unavailable or does not exist OS erro


while trying to connect to remort mssql server by command

tsql -S SQLEXPRESS -U sa

passwod :sa it throws error as Error 20009 (severity 9):Unable to connect: Adaptive Server is unavailable or does not exist OS error 111, "Connection refused"

Steps i followed /etc/freetds/freetdsconf.conf

[SQLEXPRESS] host = port = 1433 tds version = 8.0 client charset = UTF-8 /etc/odbcinst.ini [FreeTDS] Description = TDS driver (Sybase/MS SQL) Driver =/usr/lib/i386-linux-gnu/odbc/libtdsodbc.so Setup =/usr/lib/i386-linux-gnu/odbc/libtdsS.so CPTimeout = CPReuse = FileUsage = 1 etc/odbc.ini [SQLEXPRESS] Driver = FreeTDS Description = ODBC connection via FreeTDS Trace = No Servername = Database = cakephp_results Port = 1433 UID = sa PWD = sa ReadOnly = No


In your odbc.ini file change 'Servername = ' to 'Server = '. Then remove the UID, PWD and ReadOnly lines from that file temporarily. You may want to remove them altogether and pass in the credentials from your application.

Then, be sure that your MSSQL DB is allowing connections through port 1433, that SQL Server is not blocking the incoming server's IP address, and that you have the correct password.

Also, if that doesn't work, review these <a href="http://freetds.schemamania.org/userguide/serverthere.htm" rel="nofollow">troubleshooting </a> instructions:


  • Resize an image in Node.js using jimp and get the path the new image
  • Python: LookupError: unknown encoding: hex
  • loopback connector for ElasticSearch
  • I'm using let keyword in for loop gives SyntaxError: Unexpected identifier
  • Redirect stdin from a file in eclipse with run configuration
  • Angular 4 using ngComponentOutlet to display dynamically changing ContentChildren
  • Getting the syntax of prepared statements right
  • How to process an integer list row by row sent to a procedure in SQL Server 2008 R2?
  • How to add database query results to an array
  • Spark SQL slow execution with resource idle
  • Can you review my Perl rewrite of Cucumber?
  • Cmake: Use imported object
  • Manifest marge error after migrating to androidX
  • Using downloaded font offline [duplicate]
  • Rxjs Observable Lifecycle
  • Filter by multiple patterns with filter() and str_detect()
  • IOS - Facebook SDK fbDidLogin not called — initialize view controllers.
  • Performance benchmark of native android map vs webview map, what parameters can be included in the b
  • Order the result by best match on other field
  • Extract the data specified in brackets '[ ]' from a string message in python
  • PySpark: Get first Non-null value of each column in dataframe
  • Creating and managing two independent random number sequences
  • Google Geocoding API limit exceeded on cell network, but not on wifi
  • wxPython UltimateListCtrl check (tick) listitem programatically
  • Thick underline when hover AND when active
  • Python Asyncio run_forever() and Tasks
  • Bazel failed to include a external static library .a
  • Spongycastle is missing many algorithms when loaded on android
  • Questions related to Garbage Collector and finalize() method
  • Could not resolve all files for configuration ':react-native-vector-icons:classpath'
  • Implementation of timeout in LDAP
  • Connect to a local database from phpmyadmin with R
  • Create an Office365 mailbox from within C# Web API method
  • I am consuming a WCF service that requires headers from a .NET 2 website. How can I programmatically
  • What is the best way to cache and reuse immutable singleton objects in Java?
  • How to use FirstOrDefault inside Include
  • Time Complexity of Fibonacci Algorithm [duplicate]