solidDB Help : Configuring and administering : Managing network connections : Connect strings for ODBC clients : Logical data source names
  
Logical data source names
The solidDB tools and client libraries support logical data source names. Logical data source names can be used to give a descriptive name to a database.
The logical data source name can be mapped to a data source as a ‘logical name’ and ‘connect string’ (network name) pair in the following ways:
Using the [Data Sources] section in the client-side solid.ini file
Add the parameters by using the following syntax:
[Data Sources]
logical_name = connect_string;
description
where description can be used for comments about the purpose of the logical name.
For example, to map a logical name My_application to a database where you want to connect by using TCP/IP, include the following lines in the solid.ini file:
[Data Sources]
My_application = tcp irix 1313; Sample data source
When an application connects to the data source My_application, the solidDB client maps this connection to tcp irix 1313.
In Windows environments, by using the registry settings (ODBC Driver Manager)
You can use the Control Panel > Administrative Tools > Data Sources (ODBC) dialog or the Registry Editor (regedit) to add mappings.
For details, see Configuring the solidDB ODBC data source for Windows.
The solidDB data management tools use the solidDB ODBC API. If you have defined an ODBC Data Source, you can use the logical name source name also when connecting to solidDB server with the solidDB tools.
For example, if you have created a data source named solid_1 with server name tcp 2525, you can connect to the solidDB server with solidDB SQL Editor (solsql) by using the following command: solsql solid_1
When connecting to the solidDB server, if the network name is not a valid connect string, the solidDB tools and clients assume it is a logical data source name. To find a mapping between the logical data source name and a valid connect string, the solidDB tools and clients check the client-side solid.ini file.
In Windows environments, if the solid.ini file is not found or the logical data source name is not defined in the [Data Sources] section, the data source settings made with the Windows registry settings are checked in the following order.
1 Data Source Name from the following registry path:
HKEY_CURRENT_USER\software\odbc\odbc.ini\DSN
2 Data Source Name from the following registry path
HKEY_LOCAL_MACHINE\software\odbc\odbc.ini\DSN
The check for the logical data source mappings might impact performance:
If the file system is particularly slow, for example, because the working directory is mapped to a network drive, checking the existence of the solid.ini file can have a measurable performance impact.
In Windows environments, all logical data source mappings in the ODBC registry are checked. The time consumed for this operation is proportional to the amount of defined data sources.
With only few (1 to 5) data sources, the connection time will be approximately 5 ms.
With 1000 data sources, the connection time will be approximately 200 ms.
However, if the solid.ini file contains the logical data source name mapping, the tools and clients do not try to access the ODBC registry for the mapping.
Go up to
Connect strings for ODBC clients