Typical Application Scenarios and Configurations
Log Diagnosis
ODBC logs are classified into unixODBC driver manager logs and psqlODBC driver logs. The former is used to trace whether the application API is successfully executed, and the latter is used to locate problems based on DFX logs generated during underlying implementation.
The unixODBC log needs to be configured in the odbcinst.ini file:
1 2 3 4 5 6 7 |
[ODBC] Trace=Yes TraceFile=/path/to/odbctrace.log [GaussMPP] Driver64=/usr/local/lib/psqlodbcw.so setup=/usr/local/lib/psqlodbcw.so |
For psqlODBC logs, you only need to add the following content to odbc.ini:
[gaussdb] Driver=GaussMPP Servername=10.10.0.13 # Database server IP address ... Debug=1 # Enable the debug log function of the driver.

The unixODBC logs are generated in the path configured by TraceFile. The psqlODBC generates the mylog_xxx.log file in the /tmp/ directory.
Automatic Primary/Standby Switchover
If a database instance is configured with one primary DN and multiple standby DNs, write the IP addresses of all DNs into the configuration file. ODBC automatically searches for the primary DN and establishes a connection with it. When a primary/standby switchover occurs, ODBC can also connect to the new primary DN.
ODBC Constraints
- ODBC does not support read on the standby node.
- ODBC does not support user-defined types and does not support user-defined parameters in stored procedures.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot