2. Upgrade PostgreSQL ODBC driver to v11.0 in Linux platform
With the MSTR iserver installed in Linux platform, the PostgreSQL Native ODBC driver installed as well which locates in folder: %INSTALL_FOLDER%/pgsql-10(in a provisioned MSTR environment from Amazon the folder is: /opt/mstr/MicroStrategy/install/pgsql-10), the driver version is v10.03, to upgrade the driver to v11.0, follow up below steps.
- a. Download the attached zip package which contains the PostgreSQL v11.0 ODBC driver: pg_rh7.zip
- b. Upload the pg_rh7.zip to the host which iserver locates and unzip the file, it’s recommended to put files in folder %INSTALL_FOLDER%/pgsql-11, sample command as:
- sudo unzip -d /opt/mstr/MicroStrategy/install/ pg_rh7.zip
- New folder /opt/mstr/MicroStrategy/install/pgsql-11 will be created automatically
- c. Edit ODBC.sh file which locates in %INSTALL_FOLDER%/env folder:
- vim /opt/mstr/MicroStrategy/env/ODBC.sh
- Modify the line: POSTGRESQL_PATH='/opt/mstr/MicroStrategy/install/pgsql-10/lib'
- To: POSTGRESQL_PATH='/opt/mstr/MicroStrategy/install/pgsql-11/lib'd.
- Edit odbcinst.ini file which locates in %INSTALL_FOLDER% folder:
- vim /opt/mstr/MicroStrategy/odbcinst.ini
- Modify the “[PostgreSQL Unicode(x64)]” section to be like:
[PostgreSQL Unicode(x64)] Driver=/opt/mstr/MicroStrategy/install/pgsql-11/lib/psqlodbcw.so Description=ODBC for PostgreSQL Setup=/opt/mstr/MicroStrategy/install/pgsql-11/lib/psqlodbcw.so FileUsage=1 DriverUnicodeType=1[TPCH_PG] Driver=/opt/mstr/MicroStrategy/install/pgsql-11/lib/psqlodbcw.so Description=PostgreSQL Unicode(x64) Database=tpch Servername=xxx.xxx.xxx.xxx Port=5432 Protocol=9.3 ReadOnly=No RowVersioning=No ShowSystemTables=No ConnSettings= DriverUnicodeType=1
|
- Note: the above folder needs to be replaced by correct iserver installation folder.
- e. Edit odbc.ini to add new DSN for PostgreSQL
- vim /opt/mstr/MicroStrategy/odbcinst.ini
- In “[ODBC Data Sources]” section, add new line for PostgreSQL:
- TPCH_PG=PostgreSQL Unicode(x64)
- Append new section to the end of odbc.ini then add new DSN info like following:
[PostgreSQL Unicode(x64)] Driver=/opt/mstr/MicroStrategy/install/pgsql-11/lib/psqlodbcw.so Description=ODBC for PostgreSQL Setup=/opt/mstr/MicroStrategy/install/pgsql-11/lib/psqlodbcw.so FileUsage=1 DriverUnicodeType=1[TPCH_PG] Driver=/opt/mstr/MicroStrategy/install/pgsql-11/lib/psqlodbcw.so Description=PostgreSQL Unicode(x64) Database=tpch Servername=xxx.xxx.xxx.xxx Port=5432 Protocol=9.3 ReadOnly=No RowVersioning=No ShowSystemTables=No ConnSettings= DriverUnicodeType=1
|
Note: the above folder needs to be replaced by correct iserver installation folder- f. Try connectivity to use the new created DSN using below command:
- $: ./bin/mstrtodbcx
- >: .cn -d pg_Native_11 -u uid -p pwd
- g. Create data source in MTDI interface using the created DSN connecting to PostgreSQL instance