Access the server environment
The server environment describes the environment of the database server in which the UDR executes. The server environment is established when the database server is initialized with the oninit utility (or its equivalent).
The operating-system process that runs the oninit utility (or its equivalent) is called the server-initialization process. This process invokes the database server instance.
Server-environment information | How it is established |
---|---|
Environment variables | The environment variables set for the server-initialization process |
File-access permissions | The file-access permissions of the server-initialization process |
Configuration parameters | The ONCONFIG file that is current for the database server |
Working directory | The working directory of the server-initialization process |
The server environment includes the value of the SERVER_LOCALE environment variable, which can specify a nondefault server locale. Values of the DB_LOCALE and CLIENT_LOCALE environment variables in the server locale do not necessarily apply to the UDR. While it executes, a UDR obtains the client and database locales from the server-processing locale (which the database server creates when the client application establishes a connection). You can obtain the current value of DB_LOCALE with the mi_get_db_locale() function. For more information about these locales, see the Informix® GLS User's Guide.
The UDR obtains its server environment when it begins execution. You can obtain the values of the server-environment variables and configuration parameters with the mi_get_serverenv() function.