Hello Support Team,
I have a question regarding the ODBC archive. From the training module, we see that cons of using the ODBC archive is there is no disconnection management.
What I understand from this statement is that in case any disconnection happens, PcVue has to be stopped and started again to establish the connection again.
I might be wrong with this, so can anyone tell me if there is any other way to reestablish connection without stopping PcVue?
I did a simple test to connect to a local ODBC SQL server and simulated the issue by stopping the SQL server. During stop SQL, I observed the below error in the PcVue event viewer, and after SQL started, there are no new events, and the database is no longer updated.
2021/06/29,21:15:51.227,8,E,,14048,,1,His : SGBD Database01 (SQLSVR) : Error selecting record
2021/06/29,21:15:51.227,8,E,,14014,,1,ConnectionWrite (WrapperWrite()).
2021/06/29,21:15:51.227,8,E,,14014,,1,General network error. Check your network documentation.
The reason I am asking this question, I have a client ticket that faces HDS stopped recording at random after some time in the ODBC archive.
I checked the logs (both trace and HDS) but did not see any error on HDS, neither are any on the Event Viewer. The ODBC server is on a remote server, so we suspect it could be due to a lost connection from PcVue to the ODBC server. However, stopping and starting PcVue when PcVue is not preferred because the system is being used for operation and control.
Any help or suggestion is appreciated.
Thanks,
Kantha
Hello,
For a quick reply, yes there is an undocumented scada basic instruction.
Here is a piece of mail from February 2020 :
The SCADA verb is now in place. You can now use it with the recent PcVue 11.2 Update.
• A new mode to force reconnection to database in ODBC (tested only for access and SQL drivers) :
HISTORY("UNIT", "Unit01", "RECONNECT");
Hope this will help you and your customer.
Best regards,
Kévin
Hello Kevin,
Thank you so much for the quick response. I tried the SB syntax and it worked perfectly.
Upon triggering RECONNECT function, the below message is seen on the Event Viewer, and the connection has resumed.
2021/06/29,22:52:35.701,8,E,,14062,,1,SGBD Database01 (SQLSVR) : The database is created/updated.
Thanks a lot.
For information in case others have the same problem, I am using 15.1 and it work fine for me.
Regards,
Kantha
Thank you Kantha for asking this question and Kévin for the answer.
Even thought quite old archive format, I have missed (I am pretty sure I am not the only one) this important update about reconnection feature.
Regards
Edouard
Thank you Kevin,
@Kantha: Could you make a SPR documentation please
Nico
Hello Nico,
SPR 69393 created.
Hi,
I recently faced to a ase where I I had to used this scada basic instruction and noticed there was still no documentation available.
I told it to Benoît; but he answered me that this feature was supposed to be hidden because we didn't want to promote it.
BR,
Grégoire
I confirm that this must remain undocumented,
ODBC does not support reconnection. This is just a workarround where we delete and recreate the runtime object to simulate a reconnection. We are losing everything that was buffered in the meantime.
This was done for Iberdrola's specific needs.
I should have been more talkative about it the first time, sorry about that.
Best regards,
Kévin
Hello all,
Thanks for the updates and clarification. As Kevin said the ODBC reconnection was just a workaround and not meant to be published as a function on its own.
However, I have 2 points :
- Even with the disadvantage that it brings, which is the loss of data in the buffer when we do reconnect, it also has an advantage of recovering the connection without having to stop and start PcVue again. However, as I mentioned before I have tested this on 11.2 and 15.1 but I see that this option is not available in 12.0. So I have created an SPR for this: 69424, so that it could be integrated on PcVue 12. Let's hope it gets approved.
- In our training module, we do specify the pros and cons clearly on the ODBC archives, mainly on the point that the ODBC archive unit does not have disconnection management, but I could not find the same information on PcVue help, maybe I'm lost. So anyway I still raise an SPR for this, 69425, so that the help documentation could be updated with more information.
Have a good day everyone.
Thanks,
Kantha
Hello,
I have a client request about ODBC (Oracle), and I think it is related to this topic.
Is the same thing but in the inverse order. The client has several redundant servers. When the passive one becomes the active one, it cannot connect to Oracle. In that case is a ODBC limitation or a PcVue limitation?
I copy/paste the client request for more details:
We have detected an error when a server is trying to connect to Oracle. Let me explain the whole situation:
We have 36 pairs of servers working in our project (72 in total, divided in 2 groups, A and C). Those 2 groups work in redundancy. 36 servers acts as active, and the other 36 servers as passive.
Last night, at certain moment (00:36), due to a communication error, all the servers were balanced and change from active to passive. In that moment, when the passive servers were forced to become active and connect to database, many of them were unable to connect to the database. Checking the logs, this is what we saw:
2021/07/14,00:37:27.708,8,a,,14014,,172,ORA-03113: end-of-file on communication channel Process ID: 8684 ID: 672 Serial number: 19332
We have faced this situation other times, and if we balance the affected server from active to passive, the connection is established again with the Oracle database.
The point here is that, we need to understand more deeply how this connection is made and why does sometimes this kind of error take place.
Thanks,
Claudia
Hello Claudia,
The error is not ODBC related. The Oracle documentation I found tends to be very generic on this issue, This is described to be something like a timeout.
The alert.log file seems to be the first step into Troubleshooting the issue, and search for any server or driver related error message :
https://docs.oracle.com/cd/B19306_01/win.102/b14306/appendixb.htm
Hope this can get us more information.
Best regards,
Kévin
Hello,
Thanks Kevin for your help, I will try to search more information about this issue with the client.
The client asked me if there is a Scada Basic instruction to force the Oracle reconnection. Do you think I can give him the SB instruction :
HISTORY("UNIT", "Unit01", "RECONNECT"); you were talking about?
BR,
Claudia
As I told below the Scada verb can provide a workaround, but will not resolve the issue that the project is facing.
Best regards,
Kévin
Hello,
Ok, I understand. Thank you so much.
BR,
Claudia


