You are not logged in.
Pages: 1
Topic closed
Hi,
At some point soon I am going to have to connect to a existing MSSQL database at the same time as my MySQL one.
Is it possible to connect to two or more different types of database from the same task?
If so is there anything I should know about when setting it up, or any pointers where to look for more info about this?
Also are you able to point me to any information on connecting to a MSSQL database, as all the documentation refers to MySQL?
Cheers,
Adam
Offline
Hi Adam,
thanks for your questions! MsSQL connection is possible, the configuration is very similar to MySQL. You need to install unixodbc and tdsodbc packages on your Raspberry Pi:
sudo apt-get install unixodbc tdsodbc
Moreover you need to add the following to /etc/odbcinst.ini:
[MSSQL]
Description = Microsoft SQL driver
Driver = /usr/lib/arm-linux-gnueabihf/odbc/libtdsodbc.so
The rest is the same as in the case of MySQL database.
Connecting to 2 (or more) databases is also possible, you just need to put 2 (or more) IODRV blocks in your executive configuration.
See this topic which deals with the same question, only for S7 driver for Siemens PLCs.
If you need additional explanation, I'll be happy to help.
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Thank you Jaroslav, I have it working now. As always your help is appreciated and invaluable.
Cheers,
Adam
Offline
Glad I could help!
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Pages: 1
Topic closed