Hi folks,
This looks like a long post but a lot of it it is just related/useful tech notes at the bottom.
I'm trying to get data logging to work again so we can finally have historical trends. I've attempted this on the last two projects, ran out of time and had to move on and now I'm back to it again on the third project. I don't know how something so easily implemented in Wonderware can be made so difficult in FTView but anyway!
I've read probably all the technotes there are on this and found there are some bits of conflicting information but I can datalogon successfully without any errors so I'm presuming I have the dsn configured correctly. One technote states you must use a File dsn and to search for it in My Documents folder, another one says use the System dsn. I found using the System dsn works (at least I don't get any errors when issuing the datalogon command) so that's what I've gone for. It just doesn't look like it's actually logging info to the database because if I try to trend it I either get a flatline at 0 depending on how I configure the trend or nothing at all.
System info: Windows 10 Pro x64, FTView V9, SQL Server 2014
What I'm trying to achieve: Historical trending.
What I've tried:
DSN: I've set this up using C:\Windows\sysWOW64\odbcad32, it's using SQL login credentials which are correct, not the integrated windows mode, and I've changed the default database from the master to the one I want to log to. After doing this the test comes back successful. I'm also using the sql server native client 10.
In SQL I've enabled named pipes and opened tcp port 1433. It's all local but I'm just trying everything at this stage. The users I have in the database have almost every right there is (see pic). The instance was configured to use both Windows and SQL login details.
I have also added the users "NT AUTHORITY/SERVICE" & "LOCAL SERVICE" and given them sysadmin rights.
I've set up numerous logs and dsn's trying to get this to work. I'm only using one dsn at a time and one log at a time though just in case it doesn't like multiples. I am also remembering to execute the datalogon command and it's starting successfully.
Questions/Comments:
One thing I just noticed is that when I log in using windows credentials, I don't seem to have permission to open up the databases even though I've assigned the windows user sysadmin rights and db owner... any ideas why that might be happening? (Edit: I was looking at the wrong windows user, fixed now but the issue remains)
Will the data log models work with the trendpro in FTView or will it only work with the standard trend?
Should the added users "NT AUTHORITY/SERVICE" "LOCAL SERVICE" etc have their default database mapped to the master or the database I want to write to? In my case it's called SQLExpress. (Edit: I just tried mapping them to SQLExpress and it didn't like it so went back to the master.)
For anyone that's set this up before, what pitfalls did you encounter? I'm either missing something critical every time I try to do this or else I'm losing the plot. I'm using SQL Server 2014 on this machine, I'm tempted to try a 2008 database and see if that makes any difference but I'm sure I checked if 2014 was compatible before I installed it.
Tech notes that I've read that might be useful to anyone else reading this in the future:
Cannot Start the Datalog Type ODBC - Unable to Access ODBC Data Source
554607
ODBC System DSN for 32-bit Applications on a 64-bit OS
471174
Step by step - How to Install SQL Server 2008 R2 to log FactoryTalk Alarms and Events History
521520
FactoryTalk View SE: Unable to access ODBC data source
1041464
Datalogs will not work if installing SQL server after installing FactoryTalk View SE
70187
FactoryTalk View Machine Edition: Data Logging Best Practices
36265
Installing IIS after FactoryTalk View SE has been installed
64845
This looks like a long post but a lot of it it is just related/useful tech notes at the bottom.
I'm trying to get data logging to work again so we can finally have historical trends. I've attempted this on the last two projects, ran out of time and had to move on and now I'm back to it again on the third project. I don't know how something so easily implemented in Wonderware can be made so difficult in FTView but anyway!
I've read probably all the technotes there are on this and found there are some bits of conflicting information but I can datalogon successfully without any errors so I'm presuming I have the dsn configured correctly. One technote states you must use a File dsn and to search for it in My Documents folder, another one says use the System dsn. I found using the System dsn works (at least I don't get any errors when issuing the datalogon command) so that's what I've gone for. It just doesn't look like it's actually logging info to the database because if I try to trend it I either get a flatline at 0 depending on how I configure the trend or nothing at all.
System info: Windows 10 Pro x64, FTView V9, SQL Server 2014
What I'm trying to achieve: Historical trending.
What I've tried:
DSN: I've set this up using C:\Windows\sysWOW64\odbcad32, it's using SQL login credentials which are correct, not the integrated windows mode, and I've changed the default database from the master to the one I want to log to. After doing this the test comes back successful. I'm also using the sql server native client 10.
In SQL I've enabled named pipes and opened tcp port 1433. It's all local but I'm just trying everything at this stage. The users I have in the database have almost every right there is (see pic). The instance was configured to use both Windows and SQL login details.
I have also added the users "NT AUTHORITY/SERVICE" & "LOCAL SERVICE" and given them sysadmin rights.
I've set up numerous logs and dsn's trying to get this to work. I'm only using one dsn at a time and one log at a time though just in case it doesn't like multiples. I am also remembering to execute the datalogon command and it's starting successfully.
Questions/Comments:
One thing I just noticed is that when I log in using windows credentials, I don't seem to have permission to open up the databases even though I've assigned the windows user sysadmin rights and db owner... any ideas why that might be happening? (Edit: I was looking at the wrong windows user, fixed now but the issue remains)
Will the data log models work with the trendpro in FTView or will it only work with the standard trend?
Should the added users "NT AUTHORITY/SERVICE" "LOCAL SERVICE" etc have their default database mapped to the master or the database I want to write to? In my case it's called SQLExpress. (Edit: I just tried mapping them to SQLExpress and it didn't like it so went back to the master.)
For anyone that's set this up before, what pitfalls did you encounter? I'm either missing something critical every time I try to do this or else I'm losing the plot. I'm using SQL Server 2014 on this machine, I'm tempted to try a 2008 database and see if that makes any difference but I'm sure I checked if 2014 was compatible before I installed it.
Tech notes that I've read that might be useful to anyone else reading this in the future:
Cannot Start the Datalog Type ODBC - Unable to Access ODBC Data Source
554607
ODBC System DSN for 32-bit Applications on a 64-bit OS
471174
Step by step - How to Install SQL Server 2008 R2 to log FactoryTalk Alarms and Events History
521520
FactoryTalk View SE: Unable to access ODBC data source
1041464
Datalogs will not work if installing SQL server after installing FactoryTalk View SE
70187
FactoryTalk View Machine Edition: Data Logging Best Practices
36265
Installing IIS after FactoryTalk View SE has been installed
64845
Last edited: