Skip to Content.
Sympa Menu

freetds - [freetds] Named instance

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Named instance
  • Date: Mon, 24 Jan 2005 21:17:05 +0100

I found some time to implement this feature in 0.64.

Mainly all code reside in int tds7_get_instance_port(const char *ip,
const char *instance) (defined net.c). If you open a datagram socket to
server and try to get port number sending request information every
second and stopping after 16 seconds or if server reply correctly.

freetds.conf has a new "instance" configuration while TDSCONNECTION have
an extra DSTR instance_name field.

ODBC (as MS version) use SERVER=host\instance syntax (in DSN or DSN-less
configurations).

Attached a patch for userguide that add these informations (I didn't
commit it, I think some mother language should revise it). Oh.. tdsping
it's just coming...

freddy77

Index: doc/userguide.sgml
===================================================================
RCS file: /cvsroot/freetds/freetds/doc/userguide.sgml,v
retrieving revision 1.87
diff -u -r1.87 userguide.sgml
--- doc/userguide.sgml	30 Nov 2004 01:26:07 -0000	1.87
+++ doc/userguide.sgml	24 Jan 2005 20:03:19 -0000
@@ -876,6 +876,13 @@
 	<entry>default value of TEXTSIZE, in bytes.  For <type>text</type> and <type>image</type> datatypes, sets the maximum width of any returned column. Cf. <command>set TEXTSIZE</> in the <acronym>T-SQL</> documentation for your server.  </entry>
 	<entry>0 to 4,294,967,295</entry>
 	</row>
+	<row>
+	<entry>instance</entry>
+	<entry>none</entry>
+	<entry>instance name of Microsoft SQL Server to connect to. Port will be detected automatically.
+		NOTE: this require an extra round-trip with server and can slow down connection.</entry>
+	<entry>instance name</entry>
+	</row>
 </tbody>
 </tgroup>
 </table>
@@ -1454,7 +1461,16 @@
 The unit tests rely on the <filename>PWD</> file in root of the FreeTDS source tree.  
 <filename>PWD</> holds a username, password, servername, and database to be used for the unit tests.  We try to make sure to leave nothing behind: any data and objects created are either temporary or removed at the end of the test.  The tests should all work, subject to disclaimers in the directory's <filename>README</>.  			</para>
 			<para>
-To invoke the tests, edit the <filename>PWD</> file and issue the command <command>make check</command>.  In order to execute all tests successfully, you must indicate a working, available dataserver in <filename>PWD</>. 
+To invoke the tests, edit the <filename>PWD</> file and issue the command <command>make check</command>.  In order to execute all tests successfully, you must indicate a working, available dataserver in <filename>PWD</>.
+Some tests require some special access in order to create store procedure on server.
+			</para>
+			<para>
+ODBC tests can require additional setup in order to execute correctly test.
+This cause SRV entry in PWD file specify DSN entry in your <filename>odbc.ini</>. All ODBC tests build their own <filename>odbc.ini</> and try to redirect DM to this file however this it's very DM dependent so it can fail if you don't have
+either iODBC or unixODBC.
+			</para>
+			<para>
+As of 0.63 you can have some problems running tests under Mac OS X (executable cannot find some library). Setting DYLD_LIBRARY_PATH environment to paths to source compiler libraries fix the problem.
 			</para>
 			<para>
 <tip><para>
@@ -1581,7 +1597,13 @@
 	</row>
 	<row>
 	<entry><literal>Server</></entry>
-	<entry>Hostname of a server. Used in an ODBC-only configuration.</entry>
+	<entry>Hostname of a server. Used in an ODBC-only configuration.
+		As of version 0.64 you can use syntax server\instance to specify
+		a Microsoft SQL Server instance. Note that using this type of
+		specification instead of specific port require an extra round trip
+		during connection. Ask to your administrator to get port number
+		or use tdsping utility.
+	</entry>
 	<entry>A server name or (ip) address</entry>
 	<entry>none</entry>
 	<entry>yes</entry>
@@ -1644,7 +1666,9 @@
 	<row>
 	<entry><literal>Address</></entry>
 	<entry>IP address of the dataserver. 
-		Useful if you want to specify a server by address, rather than by name.</entry>
+		Useful if you want to specify a server by address, rather than by name.
+		Syntax should be ip,port or just ip.
+	</entry>
 	<entry>Any</entry>
 	<entry>none</entry>
 	<entry>yes</entry>


  • [freetds] Named instance, Frediano Ziglio, 01/24/2005

Archive powered by MHonArc 2.6.24.

Top of Page