This section describes how to register ODBC data sources.
There are the following two ways to register ODBC data sources on Windows.
Note
The GUI cannot be used to register the data source for 64-bit applications on Windows 8 for x64 and Windows Server 2012.
Refer to "3.2.2.2 Registering using commands" to perform the tasks for registering.
This section describes how to start the [ODBC Data Source Administrator] and register ODBC data sources.
Use the following procedure to register ODBC data sources:
Start the [ODBC Data Source Administrator].
Select [Start] >> [Control Panel] >> [Administrative Tools] >> [ODBC Data Source Administrator].
Example
This is an example of starting [ODBC Data Sources (32-bit)] from [Administrative Tools] in Windows Server 2012.
Note
To register data sources for 32-bit applications in Windows XP for x64, Windows 8 for x 64, Windows Server 2003 x 64 Editions, Windows Server 2008 for x 64, Windows Server 2008 R2, and Windows Server 2012, execute the ODBC administrator (odbcad32.exe) for 32-bit, as shown below.
%SYSTEMDRIVE%\WINDOWS\SysWOW64\odbcad32.exe
When only the current user is to use the ODBC data source, select [User DSN]. When all users using the same computer are to use the ODBC data source, select [System DSN].
Click [Add].
In the [Create New Data Source] window, select either "Symfoware Server ANSI V12.0" or "Symfoware Server Unicode V12.0" from the list of available ODBC drivers and then click [Finish].
The [PostgreSQL ANSI ODBC Driver (psqlODBC) Setup] window is displayed. Enter or select the required items, then click [Save].
The windows for "Symfoware Server ANSI V12.0 and "Symfoware Server Unicode V12.0" are the same, but the initial values for data source names are as follows:
Symfoware Server ANSI V12.0: "PostgreSQL30"
Symfoware Server Unicode V12.0: "PostgreSQL35W"
Set the following content:
Definition name | Setting value |
---|---|
Data Source | Specify the data source name to be registered in the ODBC driver manager. The application will select the name specified here and connect with the Symfoware Server database. This parameter cannot be omitted. Specify the following characters up to 32 bytes.
|
Description | Specify a supplementary description for the current data source. Specify characters up to 255 bytes.
|
Database | Specify the database name to be connected. |
SSLMode | Specify to encrypt communications. The default is "disable". The setting values for SSLMode are as follows:
|
Server | Specify the host name of the database server to connect to, using up to 18 bytes. This parameter cannot be omitted. |
Port | Specify the port number to be used for remote access. The default value is "26500". |
Username(*2) | Specify the user that will access the database. |
Password(*2) | Specify the password for the user that will access the database. |
*1: If specifying either "verify-ca" or "verify-full", use the system environment variable PGSSLROOTCERT of your operating system to specify the CA certificate file as shown below.
Example:
Variable name: PGSSLROOTCERT
Variable value: caCertificateFileStorageDir/root.crt
*2: In consideration of security, specify the Username and the Password by the application.
This section describes how to use commands to register ODBC data sources.
Use the following tools from Microsoft to register ODBC data sources:
Tool | OS |
---|---|
ODBCConf.exe | Windows XP |
Add-OdbcDsn | Windows 8 |
The following describes the two ways to register ODBC data sources. Refer to MSDN for information on how to use the commands and for the descriptions of the parameters.
ODBCConf.exe is a tool supported on all Windows platforms.
ODBCConf.exe /A { dataSourceType "OdbcDriverName" "optionName=value[|optionName=value...]"} [/Lv fileName]
Refer to the Microsoft MSDN library for information on the format and parameters.
Set the following content:
Definition name | Setting value |
---|---|
Data source type | Specify the data source type.
Note When CONFIGSYSDSN is specified as the data source type, it is necessary to execute the command in the command prompt in administrator mode. |
ODBC driver name | Specify an ODBC driver name that has already been registered on the system. Specify one of the following:
|
Option name | The following items must be set:
Specify the following values as required:
|
File Name | You can output process information to a file when creating a data source. This operand can be omitted. |
Example
ODBCConf.exe /A {CONFIGSYSDSN "Symfoware Server Unicode V12.0" "DSN=odbcconf1|Servername=sv1|Port=26500|Database=db01|SSLMode=verify-ca"} /Lv log.txt
Note
In consideration of security, specify the UID and the Password by the application.
Add-OdbcDsn is used in the PowerShell command interface.
Add-OdbcDsn data source name -DriverName "ODBC driver name" -DsnType data source type -Platform OS architecture -SetPropertyValue @("option name=value" [,"option name=value"...])
Refer to the Microsoft MSDN library for information on the format and parameters.
Set the following content:
Definition name | Setting value |
---|---|
Data source name | Specify any name for the data source name. |
ODBC driver name | Specify an ODBC driver name that has already been registered on the system. Specify one of the following:
|
Data source type | Specify the data source type.
Note When System is specified as the data source type, it is necessary to execute the command in the administrator mode of the command prompt. |
OS architecture | Specify the OS architecture of the system.
|
Option name | The following items must be set:
Specify the following values as required:
Note When using Add-OdbcDsn, the strings "UID" and "Password" cannot be set as option names. These can only be used when using ODBCConf.exe. |
Example
Add-OdbcDsn odbcps1 -DriverName "Symfoware Server Unicode V12.0" -DsnType System -Platform 32-bit -SetPropertyValue @("Servername=sv1", "Port=26500", "Database=db01", "SSLMode=verify-ca")