Defining Data Sources to Natural

You have to define the data sources which your application programs are to access. This section describes how to define data sources to Natural clients. It covers the following topics:


Natural Global Configuration File

Each data source must be defined in the Natural global configuration file NATCONF.CFG. For more information about modifying the Natural configuration file, see the installation instructions for Natural.

The steps for defining the data sources are the same on all client platforms:

  1. Access the Natural global configuration file (NATCONF.CFG).

  2. Define each data source to Natural.

  3. Save the updated Natural global configuration file.

These steps are described below in detail for each client platform: UNIX and Windows.

Software AG recommends not to use a client machine as an RDBMS server.

UNIX Clients

Access the Natural Global Configuration File

To access the Natural global configuration file:

  1. Enter the command natparm at the system prompt to display the Natural Parameter Setting menu.

  2. Select Configuration; if this option is not displayed on the menu, you do not have authorization to modify the configuration files.

  3. Select the Global Configuration File option.

  4. Select the DBMS Assignment option to display the options for defining the data source(s), as described in the following section.

Define the Data Sources

The DBMS assignment includes the "connect string" that Entire Access uses to establish the connection with the data source.

Perform the following steps for each data source you wish to define:

  1. In the DBID entry field, specify a unique database ID.

  2. In the DBMS Type entry field, specify "SQL"; use this value for each data source.

  3. In the DBMS Parameter entry field, specify a connect string as described below.

  4. In the Modify/Delete entry field, enter "M" (Modify) and press ENTER .

Save the Updated Natural Global Configuration File

  1. When you have defined all the data sources, exit the DBMS Assignment window.

  2. Select the Save to Global Configuration File option and press ENTER.

  3. Exit the Natural Parameter Setting function.

Windows Clients

Access the Natural Global Configuration File

To access the Natural global configuration file:

  1. Invoke the Natural Configuration utility either by double-clicking on the Natural Configuration Utility icon in the Natural Program Group, or by entering the command natparm at the command prompt.

  2. Select Natural Configuration Files > Global Configuration File > DBMS Assignments.

Define the Data Sources

The global DBMS assignment includes the "connect string" that Entire Access uses to establish the connection with the data source.

Repeat the following series of steps for each data source you wish to define:

  1. In the DBID field, specify a unique database ID.

  2. In the DBMS Type field, specify "SQL". Use this value for each data source.

  3. In the DBMS Parameter field, specify a connect string as described in the following sections.

Save the Updated Natural Global Configuration File

When you have defined all the data sources, save the global configuration file.

Local Client Connect Strings

A local connect string is used when the client application and the server are located on the same UNIX or Windows machine.

Syntax for Local Client Connect Strings

The syntax for a local database connect string is as follows: dbms:db-name.

dbms Specifies the Entire Access database driver to be used and is required.
db-name

Must be the name that was specified when the database was created. It is required by most, but not all, databases and may or may not be case-sensitive. Oracle, for example, uses TNS names.

For ODBC connections, use the data-source name instead of the database name.

Samples of Local Client Connect Strings for UNIX

The following table lists data sources and corresponding connect strings:

Data Source Client Connect String
Adabas D 15 AAD15:mydb
DataDirect ODBC ODBCINT:mydsn
DB2 DB2:shand
Informix INF:shand
Oracle ORA:mytns
Sybase CTLIB SYBCT:pubs2
Sybase DBLIB SYBDB:pubs2

Note:
The driver names are case-sensitive. For example, the name of the Oracle RDBMS driver is ORA.so. It uses ORA in the connect string. ORA is an executable that is used by the RDBMS server program "serversingle" (dispatcher) to load the ORA.so shareable library. The individual shareable-library RDBMS drivers for local access are created via the osxlibs.sh utility. After running the osxlibs.sh script, the ORA.so shareable library exists, and the ORA: connect string states that the ORA executable should be loaded. The ORA executable then loads the ORA.so shareable library.

Samples of Local Client Connect Strings for Windows

The following table lists data sources and corresponding connect strings:

Data Source Client Connect String
Adabas D 15 AAD15:DATABASE
DB2 DB2:SAMPLE
Informix INF:stores9
MS SQL Server 2012, 2014, 2016, 2017, 2019 MSSQLODBC:datasource (see Note 1 below)
MS SQL Server 2012, 2014, 2016. 2017, 2019 MSSQLODBCN:datasource (see Note 2 below)
Oracle ORA:mytns
Sybase CTLIB SYBCT:pubs2
Sybase DBLIB SYBDB:pubs2
ODBC ODBC:datasource

Notes:

  1. If this connect string is used, datasource has to be defined as an ODBC data source using the Microsoft ODBC Administrator. Natural 8.4 or above is a prerequisite.
  2. If this connect string is used, datasource has to be defined as SQL Server native client data source using the Microsoft ODBC Administrator. Natural 8.4 or above is a prerequisite.

Remote Client Connect Strings

The remote connect string is the same for all client platforms.

Syntax for Remote Client Connect Strings

For remote access to UNIX, Windows and z/OS RDBMS servers, connect the Entire Access network component by specifying "NET":

NET:[db-name]@server-number:host-name!driver
db-name Must be the name that was specified when the data source was created. It is required by most, but not all, data sources and may or may not be case-sensitive. Oracle, for example, uses TNS names.
server-number Is a 4-digit number from 1025 to 9999 which identifies the server daemon; it must match the server number you specify when you start the server daemon. See also Default Server Numbers for Windows below.
host-name Identifies the host machine on which the server runs. Enter either the name (as specified in the /etc/hosts file) or the Internet address (in nn.nn.nn.nn format) of the host.
driver Specifies the database driver to be used.

Default Server Numbers for Windows

The following table shows the default server number for each Windows platform:

Platform Server Number
Windows 2000 servers 2000
Entire Access Service server 2001

Windows 2000 or Windows 2003 multithreaded servers
(support for multithreaded servers is limited; the standard Windows 2000 or Windows 2003 server may be required).

2022

Note:
The Entire Access server number correlates directly with a TCP/IP socket port number.

Samples of Remote Client Connect Strings for UNIX

The following table lists data sources and corresponding connect strings:

Data Source Client Connect String
Adabas D 15 NET:mydb@2002:myhp!AAD15
DataDirect ODBC NET:mydsn@2004:mysun!ODBCINT
DB2 9 NET:sas@1994:mywin!DB2
DB2 10 NET:sas@2000:myredhat!DB2
Informix NET:shand@1986:mylinux!INF
Oracle NET:mytns@2006:mylinux!ORA
Sybase 15 CTLIB NET:pubs2@1984:myaix!SYBCT
Sybase 15 DBLIB NET:pubs2@1985:mylinux!SYBDB

Samples of Remote Client Connect Strings for Windows

The following table lists data sources and corresponding connect strings:

Data Source Client Connect String
Adabas D 15.0 NET:DATABASE@2050:dbhost!AAD15
DB2 NET:SAMPLE@2050:dbhost!DB2
Informix NET:stores9@2050:dbhost!INF
MS SQL Server 2012, 2014, 2016, 2017, 2019 NET:datasource@2050:dbhost!MSSQLODBC (see Note 1 below)
MS SQL Server 2012, 2014, 2016, 2017, 2019 NET:datasource@2050:dbhost!MSSQLODBCN (see Note 2 below)
Oracle NET:mytns@2050:dbhost!ORA
Sybase CTLIB NET:pubs2@2050!SYBCT
Sybase DBLIB NET:pubs2@2050!SYBDB
UNIX ODBC Generic NET:datasource@7898:dbhost!ODBCINT
Windows ODBC Generic NET:datasource@2050:dbhost!ODBCNET

Notes:

  1. If this connect string is used, datasource has to be defined as an ODBC data source on dbhost using the Microsoft ODBC Administrator. Natural 8.4 or above is a prerequisite.
  2. If this connect string is used, datasource has to be defined as an SQL Server native client data source on dbhost using the Microsoft ODBC Administrator. Natural 8.4 or above is a prerequisite.