I know that there are several PcVue projects that are connected to Oracle databases for data archiving.
What is your experience with Oracle?
Are there any particularities that need to be taken into account?
Are there any prerequisites for setting up a project with Oracle archiving?
No experience on my side.
Only thing I can say, is that you've to use an ODBC connection. This kind of connection has some limitations:
- even with 10.0 you're limited with the length of variables' name and attribute as if you were using à 9.0
- database is limited to 2Go because of Microsoft limitations (but it could have changed)
Thanks, Florent.
I was not aware that with ODBC there is still the limitation in variable names' length. That is a huge restriction. Is it going to be solved in one of the upcoming versions?
No, it will not solved, because ODBC driver max record size is too low.
It is at 4000 bytes (8060 bytes for SQL), and even with the current limitations if you set every field at its max size (variable name, tatt, indirect tatt, ...) we already exceeds this limit with a trend (4593 bytes)
Big experience with a project for BMW. Basically PcVue gets the data from their Oracle database in Munich every morning.
I did use a buffer to push the data to Oracle as a workaround to the limit of 255 caracters
Below an extract from the prog
Let me know if you need more info
PS : sorry comments in French but sure you'll handle it 😉
"SUB Occupation ( ) '--------- Proc‚dure ‚criture dans table Occupation
Dim req as Str;
Dim ch1 as Str,ch2 as Str;
Dim Hbase as Long;
DIM L_NB_VEH_ENTR as STR,L_NB_VEH_SORT as SINGLE,L_MAX_VEH_ENTR as SINGLE,L_MAX_VEH_SORT as SINGLE;
DIM L_Lgr_SQL_REQ as integer;
DIM L_BUFF as long;
L_BUFF=ALLOC_BUFFER(2048);
print("PROG : Identifi , FONC : Occupation");
Horodate=Addstring(@DATE," ");
Horodate=Addstring(Horodate,@TIME);
PRINT("Horodate : ",Horodate);
req="INSERT INTO tOccupation (idPiste, idAnnonce, idPilote, fahrer_id, datHeureEntree, datHeureSortie, txtRefus,NB_VEH_ENTR,NB_VEH_SORT, MAX_VEH_ENTR,MAX_VEH_SORT) VALUES (";
Print("lgr req : ",LEN(req));
PUT_BUFFER(L_BUFF,0,req);
Print ("req intermediaire .",cget_buffer(L_BUFF,0,300));
Ch1=Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 7 ); '*** R‚cup‚ration idPiste
Ch2=Addstring(Ch1,","); ' Ajout " , "
CH1="220413";
Ch2=Addstring(Ch2,Ch1); ' Concat‚nation
Ch2=Addstring(Ch2,","); ' Ajout " , "
Ch1="48188";
Ch2=Addstring(Ch2,Ch1); ' Concat‚nation
Ch2=Addstring(Ch2,",'"); ' Ajout " ,' "
Ch1=Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 11 ); ' R‚cup‚ration fahrer_id
Ch2=Addstring(Ch2,Ch1); ' Concat‚nation
Ch2=Addstring(Ch2,"','"); ' Ajout " ',' "
Ch1=Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 12 ); ' R‚cup‚ration heure entr‚e
Ch2=Addstring(Ch2,Ch1); ' Concat‚nation
Ch2=Addstring(Ch2,"','"); ' Ajout " ',' "
Ch1=Horodate; ' R‚cup‚ration heure sortie
Ch2=Addstring(Ch2,Ch1); ' Concat‚nation
Ch2=addstring(ch2,"','"); ' Ajout " ', "
Ch1="N"; ' Ajout " N "
Ch2=Addstring(Ch2,Ch1); ' Concat‚nation
Ch1=Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 14);' R‚cup‚ration nb_veh_entr
print("nb veh entr :",Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 14));
CH2=concat(CH2,"','",ch1,"','",TOC(L_NB_VEH_SORT)); ' R‚cup‚ration nb_veh_sort
Ch1=Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 16);' R‚cup‚ration max_veh_entr
print("nb veh sort :",Selector("GETCELL", "SUIVI", "", nomtab, Ligne, 16));
CH2=concat(CH2,"','",ch1,"','",TOC(L_MAX_VEH_SORT)); ' R‚cup‚ration max_veh_sort
Ch2=Addstring(Ch2,"' ); "); ' Ajout " '); "
print("longueur fin req :",LEN(ch2));
L_Lgr_SQL_REQ=LEN(req);
PUT_BUFFER(L_BUFF,L_Lgr_SQL_REQ,ch2);
Print ("req :",cget_buffer(L_BUFF,0,2048));
If(connectionlog(Req))then 'Si la connexion reseau avec station oracle OK alors connexion a la base
PRINT("Lien etablit avec la station Oracle");
Hbase=SVSQL("CONNECT","tour1","bmwdata","bmwdata"); ' Connexion BDD
print(hbase);
PRINT ("occupation= ",SVSQL("EXECUTE",Hbase,L_BUFF)); ' Ecriture dans Occupation
SVSQL("DISCONNECT",Hbase); '*** D‚connexion BDD
Else
PRINT("Lien avec la station Oracle impossible, copie de la requete ds connexion.log");
End if
Else
Trace ("LOG","Inhibition base de donnees");
End if
free_buffer(l_buff);
Return;
END SUB
"
Florent can you explain us this 2Go limitation you spoke about (because of Microsoft)?
I can't find any information about that.
Thank you
I think he was talking about oracle database size, isn't it ?
In light of recent events, I have to reopen this topic...
Francois (or somebody else): Could you give feedback about scalability when working with the ODBC driver?
I mean replicating data once per day is one thing, having the requirement to record hundreds or thousands of recordsets per minute is something else.
Do we have any figures about the performance of the ODBC interface in PcVue?
Hi Armin,
You're absolutely right and my experience with BMW is definitely not an exemple of high performances needs...
I have no benchmark in my pocket but I believe that ODBC is not the driver for performances. Plus, there's no mechanisms to handle failures.
You should ask Arnaud he may have a better idea and he may have a benchmark
François
Thanks Francois.
I have collected some more information.
Just to complete this thread, let me give you some more details.
I summarize:
Limitations:
- PcVue 9.0 variable limitations (40 character variable names, 40 character extended attributes...)
- No auto-reconnection
- No buffering in case of connection failure
- No more than appr. 30 records / second (compared to 200 records / seconds or more in HDS...)
Reference projects:
- BMW (FF)
- CERN (GM)
- Iberdrola (GM)
Hello everybody,
sorry but I have to reopen the topic again.
One of our customer uses PostgreSQL via ODBC. They use it because of the database - size - limitations.
Now they encountered that, when PcVue is running and connection to Databases gets lost, there is:
1. No warning that connection is lost, although there is a connection time-out.
2. Warning occurs after opening a trendmimic. So I think it is the request-timeout
3. There is no reconnection until a restart of PcVue
4. There is nothing about that in help
So I have three questions:
1. How to test (SCADA, System-Variable,...) the connection to react on connection-lost.
2. How to reconnect to ODBC source (via SCADA, ...)
3. Is Armins limitation-list up to date?
Thank you for your answers
BR
Johannes
3 years later this type of archive unit has not change at all.
I think it will never change, no more than VBA for exemple.
But we are working on a new tool to archive in more kind of database.


