Setting options and environment variables

This topic discusses using network initialization files to set various defaults for SQL OpenNet. The topic listed below discuss some additional options and environment variables you can set.

Using network initialization files to set network defaults

There are three initialization files you can use to set network defaults:

Setting connect string defaults and encryption in net.ini

The net.ini file enables you to specify an encryption key for the client, specify time-outs, instruct SQL Connection functions to return error codes for communication errors, and other options. When you install Connectivity Series, the installation creates a default net.ini file with a default encryption setting. To change settings in net.ini, use a text editor. See the Settings in net.ini file table.

Note the following:

Because VORTEX_HOME is set at the system level, if you install both 64-bit and 32-bit versions of Connectivity Series on the same 64-bit Windows machine, the last version installed determines the VORTEX_HOME setting by overwriting the previous setting. So if you do change net.ini, you’ll need to make sure you change the correct one.

Settings in net.ini file


Description and syntax


Specifies the number of seconds for socket connection time-out. The default is 0 (no time-out). To set this, use the following syntax, where n is the number of seconds:

connect_timeout n


Specifies a key for the algorithm used to encrypt user names and passwords for the database and for the host (if vtxnetd or vtxnet2 is also started with the -k option). This encrypts user names and passwords being sent across the wire.

key_connect n

where n is any number between 1 and 2,147,483,647. The value for n must be set the same on both the client (where it is set with this net.ini option) and the server (where it is set with the -k option on the vtxnetd or vtxnet2 command line). We recommend changing this setting (on the server and clients); the default setting is common knowledge and is not secure. See vtxnetd and vtxnet2 programs for more information.


Sets the minimum network packet size used by SQL OpenNet. The default is 8192 bytes. This option defines a minimum size for an aggregate buffer, which is a buffer created when data for multiple network packets needs to be sent to the client. This reduces network traffic by combining packets and sending them as a unit with the specified minimum size. To set this, use the following syntax, where size is the size in bytes:

packetsize size

Changing the default packet size may cause performance problems. The packet size should not be less than that of the prefetch buffer (specified with the bufsize argument for %SSC_INIT) plus 200 bytes. If you are using a WAN, you may want to change this value to reduce load on the network. The packet size used by SQL OpenNet server is set by the packetsize setting in the net.ini file on the client.


Sets the communication port number, which defaults to the vtxnet setting in the services file. For information, see Specifying the port number.

port port_number


Specifies how long (in seconds) SQL OpenNet should wait for a read operation to complete. By default this is set to 0, which prevents a time-out.

read_timeout time


Instructs SQL OpenNet to return an operating system error code (rather than -1) if there’s a communication error. For example, if an attempt to connect to a database on a server generates the TCP/IP socket error 10061, the %SSC_CONNECT function will return “10061” if this option is set to yes and “-1” if this option is set to no. By default return_errno is set to no.

return_errno yes|no


Specifies how long (in seconds) SQL OpenNet should wait for a write operation to complete. By default this is set to 0, which prevents a time-out.

write_timeout time

The following example net.ini file sets the service to connect to a Windows machine named mywinserver, instructs the server to use the Oracle driver, sets the encryption key to 6541, etc.

rem        SQL OpenNet init file
connect_timeout 5
key_connect 6541
packetsize 1300
port 1990
return_errno yes
read_timeout 60
write_timeout 60

Using opennet.srv to set SQL OpenNet services and environment variables (Windows)

To set an environment variable in opennet.srv, use the following syntax:


The environment variable setting should precede the line that starts the service. For example:

vtxnet2.exe -k67834 -p1660 log

For more information, see Customizing the opennet.srv file.

Using startnet to set environment variables (UNIX and OpenVMS)

The startnet (UNIX) and STARTNET.COM (OpenVMS) files start SQL OpenNet Server. You can also set environment variables in these files. Environment variables set in these files will be set on the server. Use the following syntax:

Environment variable settings should precede the line that starts the SQL OpenNet server. For example:

nohup vtxnetd -p1958 log &
sleep 1