Media Server 25.4
Media Server Help

# Create a PostgreSQL DSN on Linux

This section describes how to create a PostgreSQL data source name (DSN), so that Media Server can connect to your database. You must complete these steps on every Media Server host.

TIP: Create the DSN on the same machine as Media Server. If your Media Server is running on Windows, see Create a PostgreSQL DSN on Windows.

To create a PostgreSQL DSN on Linux

1. Install the PostgreSQL ODBC driver. For example, if you have configured the relevant yum repository:

       sudo yum install postgresql11-odbc

2. Install unixODBC driver manager version 2.2.14 or later. For example:

       sudo yum install unixODBC

3. Configure the ODBC driver.

   1. Open the file `odbcinst.ini` with a text editor. This file is usually in the `/etc` directory.

   2. Unless there is already a section to configure the ODBC driver, add a new section and set the relevant parameters. When you configure the Data Source Name (DSN) you will need to refer to the name of this section.

      Parameter | Description
      --- | ---
      Description | A description of the driver.
      Driver | The path of the PostgreSQL ODBC driver library.

      For example:

          [PostgreSQL]
          Description=ODBC for PostgreSQL
          Driver=/usr/pgsql-11/lib/psqlodbcw.so

      NOTE: You can set other parameters in this file, but these have not been tested with Media Server.

   3. Save and close the file.

4. Create a Data Source Name (DSN) for Media Server to use.

   1. Open the file `odbc.ini` with a text editor. System DSNs are usually defined in `/etc/odbc.ini`.

   2. Add a data source name in square brackets and configure the DSN.

      Parameter | Description
      --- | ---
      `Driver` | The driver to use (must match the section name in `odbcinst.ini`)
      `ServerName` | The IP address or hostname of the database server.
      `Port` | The database server port.
      `UserName` | The user name of the user you created for Media Server.
      `Password` | The password of the user you created for Media Server.
      `Database` | The name of the database that you created.
      `ByteaAsLongVarBinary` | You must set this parameter to `1`. IMPORTANT: If this value is not set to `1`, Media Server fails to start.
      `UseDeclareFetch` | (Optional) OpenText recommends setting this parameter to `1`, to reduce memory use.

      For example:

          [MediaServerPSQL]
          Driver=PostgreSQL
          ServerName=host.example.com
          Port=5432
          UserName=mediaserver
          Password=password
          Database=mediatraining
          ByteaAsLongVarBinary=1
          UseDeclareFetch=1

      NOTE: You can set other parameters in this file, but these have not been tested with Media Server.

   3. Save and close the file.

You can now configure Media Server to connect to the database (see Configure Media Server).

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Media Server 25.4

Topic Title: Create a PostgreSQL DSN on Linux