PostgreSQL

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
6 posts • Page 1 of 1
uxout
Posts:82
Joined: Wed Jul 20, 2016 12:07 pm

PostgreSQL

Post by uxout »

Hello, I would like to read data from a PostgreSQL database from my WinCC OA system. Is it possible ?
If yes, how can I integrate this feature easily ?

PS : Using WinCC OA 3.17 on Windows 10

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: PostgreSQL

Post by leoknipp »

With the functions described in the WinCC OA Documentation --> CONTROL --> Types of functions --> Database functions you can access data from an external database.
E.g. you can use the CTRL function dbOpenConnection() to connect to the database.

For details please have a look at the WinCC OA Documentation.

Best Regards
Leopold Knipp
Senior Support Specialist

uxout
Posts:82
Joined: Wed Jul 20, 2016 12:07 pm

Re: PostgreSQL

Post by uxout »

So, the best way to do this is to install custom PostgreSQL driver and use DB interface ?
There is no native PostgreSQL driver that I can use within WinCC OA?

gschijndel
Posts:376
Joined: Tue Jan 15, 2019 3:12 pm

Re: PostgreSQL

Post by gschijndel »

uxout wrote: ↑ Thu Jan 30, 2020 12:57 pmSo, the best way to do this is to install custom PostgreSQL driver and use DB interface?
You can use the official PostgreSQL ODBC driver.

More information can be found in the help under: Special functions -> Control-ADO (Access to external databases)

uxout
Posts:82
Joined: Wed Jul 20, 2016 12:07 pm

Re: PostgreSQL

Post by uxout »

Thanks for all those informations.
One last question : is it possible to force the server to get data from PostgreSQL instead of the client ?
I want to avoid the need to install PostgreSQL driver on all hosts (servers + clients)

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: PostgreSQL

Post by leoknipp »

On the machine where you want to to connect to the database you have to install the PostgreSQL driver.
If the script is executed in a UI the installation must be made on the computer where the Ui is started.

If you want to make the connection only at the server you need to implement a command / response function between the UI and a CTRL manager running at the server, e.g. via dp elements.

Best Regards
Leopold Knipp
Senior Support Specialist

6 posts • Page 1 of 1