dsnadd(1)

NAME
dsnadd - Data Source Name creation utility

SYNOPSIS

dsnadd -dsn=DSNname -db=DBname

Where:

DSNname is a name you want to assign to the new data source.
DBname is the name of the named database on the Zen host.

DESCRIPTION
dsnadd simplifies the setup of a new ODBC data source to connect to a Zen database. It modifies the odbc.ini file by providing the appropriate properties for the new data source.

Zen follows the UNIXODBC standard by using the odbcinst.ini file in /usr/local/actianzen/etc to specify a 32-bit and a 64-bit ODBC driver. DSNs that reference the "Pervasive ODBC Interface" driver description point to the odbcinst.ini information from the odbc.ini file. A single DSN can be used by both a 32-bit application and a 64-bit application.

Optionally, dsnadd provides options that let you create legacy-style DSNs that specify a 32-bit driver name in odbc.ini rather than pointing to odbcinst.ini. However, such DSNs are not accessible to 64-bit applications.

To create a DSN on the server that connects to a named database:

    dsnadd -dsn=myDSN -db=DBname

This creates a DSN with the description "Pervasive ODBC Interface" that can be used by both a 32-bit application and a 64- bit application on the server. The DSN is not visible as an Engine DSN in ODBC Administrator running on a Windows client.

To add a deprecated, legacy-style Client DSN with the description "Pervasive ODBC Client Interface," execute the following command:

    dsnadd -dsn=myDSN -sdsn=engineDSN -host=zenhost -clntdsn

Where:

engineDSN is the name of the Engine DSN on the Zen host.
zenhost is the name of the host where your Zen Server is installed.

Note that the DSN is accessible only to 32-bit applications.

To add a deprecated, legacy-style Engine DSN on the server with the description "Pervasive ODBC Engine Interface:"

    dsnadd -dsn=myDSN -db=DBname -engdsn

Note that the DSN is accessible only to 32-bit applications.

To list existing DSNs:

    dsnadd -l

OPTIONS

The following options are the most commonly used:

-db=
    Name of the database (local or remote) to which the DSN is associated

-dsn-name= | -dsn=
    The Data Source Name

-help
    Display syntax and options help for the dsnadd utility

-l  List existing DSNs

openmode=<0|1|-1|-4> | -omode=<-0|1|-1|-4>
    Specify the default file open mode for files opened with the current connection. The default is 0, or Normal. Can be used only with local connections, not remote client connections. For more information on file open modes, see DSN Open Mode in SQL Engine Reference.

-srv-host= | -host=
    Server host name

-srv-port= | -port=
    Server port number. The default is 1583. (See also Changing the Default Communication Ports in Getting Started With Zen.)

-translate=< none | auto >
    Encoding translation to use for character data. The default is none, meaning that no character data is translated between the client and server on the assumption that the client and server use the same operating system encoding.

The following options are used to create deprecated, legacy-style DSNs:

-clntdsn
    Create a deprecated, legacy-style Client DSN with the driver description "Pervasive ODBC Client Interface." Rather than using Client DSNs, new applications or revised 32-bit applications should create a DSN that connects to a named database using -db=.

-engdsn
    Create a deprecated, legacy-style Engine DSN with the driver description "Pervasive ODBC Engine Interface." Rather than using Engine DSNs, new applications or revised 32-bit applications should create a DSN that connects to a named database using -db=.

-sdsn=
    For use with deprecated, legacy-style Client DSNs. Name of an Engine DSN on the Zen Server.

The following options are typically used only for application development and testing:

-dsn-desc= | -desc=
    dsnadd provides a default DNS description in odbc.ini. If you want to override the default description, use this option to specify a descriptive string of your choosing. If the descriptive string contains the space character, you must quote the entire string with double quotes.

-drv-desc=
    dsnadd handles the driver descriptions based on the absence or presence of the -db, -clntdsn and -engdsn options. If specified, must be one of the following:

    Pervasive ODBC Interface
    Pervasive ODBC Client Interface
    Pervasive ODBC Engine Interface

-drv-path= | -drv=
    The path where the driver libraries are located. The default is /usr/local/actianzen/lib:$HOME/lib.

-odbc-ini= | -ini=
    ODBC.ini file name (for example, /usr/local/actianzen/etc/odbc.ini)

EXAMPLES

The following example creates a server-side DSN named acctingdb that connects to a local database named region1accting.

    dsnadd -dsn=acctingdb -db=region1accting

The following example creates a client-side DSN named USInvoices that connects to a database named DomesticOrders on a remote server named USInventory:

    dsnadd -dsn=USInvoices -db=DomesticOrders -host=USInventory

The following example creates a deprecated, legacy-style Client DSN named bkordersclnt that references an Engine DSN named backorderssrv on a machine named JapanSvr2 and uses automatic encoding.

    dsnadd -dsn=bkordersclnt -sdsn=backorderssrv -host=JapanSvr2 -translate=auto -clntdsn

The following example creates a deprecated, legacy-style Engine DSN named partsctlg that connects to a database named partscatalog.

    dsnadd -dsn=partsctlg -db=partscatalog -engdsn

SEE ALSO
dbmaint(1), isql(1)