Skip to main content

Does anyone have a guide or tips for setting up ODBC on Red Hat for use with the CONNECT command?

UV 12.1, Red Hat 7.9.

Our goal is to write to SQL tables directly from Universe programs - is this the correct approach? 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Does anyone have a guide or tips for setting up ODBC on Red Hat for use with the CONNECT command?

UV 12.1, Red Hat 7.9.

Our goal is to write to SQL tables directly from Universe programs - is this the correct approach? 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Hi Matthew,

If you take the CONNECT route, that you will using the BCI (Basic Call Interface) to write to the SQL tables. BCI will require extensive code changes in your UniVerse programs to work. It also raises a lot of questions around error handling should SQL be unavailable and data typing as SQL is a very typed database and you will need to make sure your data complies to those typing rules before writing to the SQL database.

A simpler option to consider is to use UniVerse EDA (External Database Access) and even EDA with U2 Replication. If you go down the EDA route then no code changes are required to your UniVerse code in order to update to read / write from SQL tables. You can still use the same READ / WRITE statements and LIST / SORT commands from within UniVerse and UniVerse treats the SQL tables as if they were UniVerse files.  Used with Replication it also allows you to have resillence built into situations such as the SQL database being unavailable stopping your application from working.

My recommendation would be to use EDA and EDA with U2 Replication.

Regards,



------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------

Does anyone have a guide or tips for setting up ODBC on Red Hat for use with the CONNECT command?

UV 12.1, Red Hat 7.9.

Our goal is to write to SQL tables directly from Universe programs - is this the correct approach? 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Are you trying to write data to remote SQL Server or other databases on your UV 12.1 server? Do you need real-time updated data information from UV 12.1 server on your SQL Server?



------------------------------
Paul Chang
Principal Technical Support Engineer
Rocket Internal - All Brands
------------------------------

Are you trying to write data to remote SQL Server or other databases on your UV 12.1 server? Do you need real-time updated data information from UV 12.1 server on your SQL Server?



------------------------------
Paul Chang
Principal Technical Support Engineer
Rocket Internal - All Brands
------------------------------

Yes we'd like to write to a remote SQL server as an event occurs in our UniVerse programs. 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Yes we'd like to write to a remote SQL server as an event occurs in our UniVerse programs. 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

You can install Microsoft ODBC driver for Linux on your Linux machine and set up the ODBC DSN first. There are some additional steps to set up the BCI connection and run the CONNECT command to connect to your SQL Server. It can run the SQL DDL and DML language on UniVerse environment. You also can create the BCI program to read or write data to SQL Server.



------------------------------
Paul Chang
Principal Technical Support Engineer
Rocket Internal - All Brands
------------------------------

Does anyone have a guide or tips for setting up ODBC on Red Hat for use with the CONNECT command?

UV 12.1, Red Hat 7.9.

Our goal is to write to SQL tables directly from Universe programs - is this the correct approach? 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Hi

Easier and cheaper than EDA and replication would be to write out text files to a shared folder and import them from the SQL side using a scheduled job.

Rgds



------------------------------
Justin Gledhill
Business Analyst
Ecolab Incorporated
NSW AU
------------------------------

Hi

Easier and cheaper than EDA and replication would be to write out text files to a shared folder and import them from the SQL side using a scheduled job.

Rgds



------------------------------
Justin Gledhill
Business Analyst
Ecolab Incorporated
NSW AU
------------------------------

Yeah we've been doing it that way for years, we've got a project at the moment where it would be nice to just write one line of SQL to update a table when we hit a certain condition and have the results instantly available.



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Hi Matthew,

If you take the CONNECT route, that you will using the BCI (Basic Call Interface) to write to the SQL tables. BCI will require extensive code changes in your UniVerse programs to work. It also raises a lot of questions around error handling should SQL be unavailable and data typing as SQL is a very typed database and you will need to make sure your data complies to those typing rules before writing to the SQL database.

A simpler option to consider is to use UniVerse EDA (External Database Access) and even EDA with U2 Replication. If you go down the EDA route then no code changes are required to your UniVerse code in order to update to read / write from SQL tables. You can still use the same READ / WRITE statements and LIST / SORT commands from within UniVerse and UniVerse treats the SQL tables as if they were UniVerse files.  Used with Replication it also allows you to have resillence built into situations such as the SQL database being unavailable stopping your application from working.

My recommendation would be to use EDA and EDA with U2 Replication.

Regards,



------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------

Thanks for your reply - EDA sounds like a more robust solution. What I was hoping for here was a quick win in setting up some very simple writes to an external SQL db that I could add to some existing programs. 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

You can install Microsoft ODBC driver for Linux on your Linux machine and set up the ODBC DSN first. There are some additional steps to set up the BCI connection and run the CONNECT command to connect to your SQL Server. It can run the SQL DDL and DML language on UniVerse environment. You also can create the BCI program to read or write data to SQL Server.



------------------------------
Paul Chang
Principal Technical Support Engineer
Rocket Internal - All Brands
------------------------------

Thanks Paul - do you know if there are any resources available on installing/configuring the driver, sample CONNECT commands etc? 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Yeah we've been doing it that way for years, we've got a project at the moment where it would be nice to just write one line of SQL to update a table when we hit a certain condition and have the results instantly available.



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

There are often a number of hoops to jump through when doing these things from within UV. Over the years we've found it far easier to work outside UV.

Another option would be to write to a type 19 file, then use a phantom on a short cycle to execute a bit of python code to do inserts using the data in the type 19 file.



------------------------------
Justin Gledhill
Business Analyst
Ecolab Incorporated
NSW AU
------------------------------

There are often a number of hoops to jump through when doing these things from within UV. Over the years we've found it far easier to work outside UV.

Another option would be to write to a type 19 file, then use a phantom on a short cycle to execute a bit of python code to do inserts using the data in the type 19 file.



------------------------------
Justin Gledhill
Business Analyst
Ecolab Incorporated
NSW AU
------------------------------

Thanks Justin - that's an interesting idea too, I'll keep that one in the back pocket cheers!



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

Thanks Paul - do you know if there are any resources available on installing/configuring the driver, sample CONNECT commands etc? 



------------------------------
Matthew Wright
Analyst
Tomago Aluminium Co PTY Ltd.
Tomago NSW AU
------------------------------

There are two parts of setup steps for UniVerse BCI connection. The first part is related to install the Microsoft ODBC driver for SQL Server (Linux). It is very easy to install the ODBC driver, setup odbc.ini and use isql tool to verify the DSN. The second part is related to UniVerse BCI setting. it requires the uvodbc.config file setting and some additional system variables setting. You can find more information on the UniVerse BCI manual and Rocket U2 Knowledge database.



------------------------------
Paul Chang
Principal Technical Support Engineer
Rocket Internal - All Brands
------------------------------