And why do I keep getting, “FTAEHistorian [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘MyUserName’.” ?!?
Recently I was setting up a VM to work on a client’s system when I ran into a problem I’ve seen many times over the years.
It occurs when you attempt to create a database for FactoryTalk Alarm and Events inside of FactoryTalk View Studio.
The worst part is it kind of half works, which imho is worse than it not working at all.
That said, on my own time (i.e. not getting paid to debug Rockwell Software 🙁 ) I began to dig into the issue to try and find what causes this problem.
NOTE: You can purchase an “ad free” copy of this article from our article shop HERE, or become a “Premium Member” for as little as $3 a month and receive $5 worth of articles and code downloads free each month!
The specific problem I ran into was this: When I added the connection in FactoryTalk View Studio (as shown in this article) I received this error:
Not understanding why my new Database User couldn’t log in, I opened SQL Server Management Studio only to find View Studio had indeed created my database (MyDatabase) and user (MyUserName)…
Confused, I started to think back to the installation of the free MS SQL Server Express that comes with View Studio. and how the Rockwell procedure asks you to change from the default setting of “Windows authentication mode” (shown below) to Mixed Mode which is needed for SQL users to log in:
So with that in mind, my next step was to check to see if my SQL Server was indeed setup for Mixed Mode by right clicking on my Server in the management studio and selecting Properties as shown below:
And to my surprise it wasn’t:
Thinking back to when I installed MS SQL Express, I realized I just kept clicking on next, next, next (typical North-Eastern impatience) and passed right by that setting.
And that’s what lead to the frustrating (but self-inflicted ?) “FTAEHistorian Login failed for user” error I was getting.
So to resolve the issue, I changed the Server Authentication Mode to “SQL and Windows,” clicked OK, and then restarted my SQL Server by right clicking on the Server and selecting Restart as shown below:
Note: There is another rarer reason for getting this error that I’ve also run into – If when creating your connection in View Studio you provide an existing database user name, but then provide an incorrect password, you’ll get the very same “FTAEHistorian Login failed for user” error popup.
Have a question or comment? Please feel free to leave them with us by clicking on the “post a comment or question” link at the very bottom of this page.
Until next time, Peace ✌️
If you enjoy this episode please give it a Like, and consider Sharing as this is the best way for us to find new guests to come on the show.
Shawn M Tierney
Technology Enthusiast & Content Creator
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
- Automation News for October 10, 2024 (N248) - October 10, 2024
- tManager by Softing: Connecting Control Systems to Databases and the Cloud (P222) - October 9, 2024
- First Look: Connecting to a SLC-100 and Uploading the Program (TME05) - October 8, 2024
Discover more from The Automation Blog
Subscribe to get the latest posts to your email.
I have a similar issue with my new Windows 10 clients trying to connect to my Alarms and Events SQL database. The clients are connecting to the HMI server fine, showing real time alarms, trending fine, but when I use alarm summary to try and connect to the FTAE server, I am getting denied. The current Windows 7 clients are working fine. Where are credentials loaded when doing an Alarm Summary( ie how does the server know who is asking for the data from the client)?
Good morning @Jim McGrath,
I thought there was a patch for that issue? What version are you using?
Might make sense to try the latest patch roll-up.
Sincerely,
Shawn Tierney
Instructor at http://www.TheAutomationSchool.com
Have you ever set this up using windows authentication instead of a SQL account?
Good morning @Garrett James,
I typically don’t use Windows Authentication unless I’m also using a Windows Domain. But when I have used a Domain with it everything has worked fine (some versions require a patch.)
For those wondering why I wouldn’t use Windows Authentication without a Domain, even if you have two workgroup computers with the same login, those logins aren’t the same actual “user” (aka they have different SIDs.)
Long story short, setting up Windows Authentication using Local Windows Users makes that configuration specific to that one PC, since a local user is unique to that one PC.
But by using a SQL user, when you backup and restore the SQL database (as well as your FTView Project) you’ll also get the SQL Users and everything will continues to work.
Sincerely,
Shawn Tierney
Instructor at http://www.TheAutomationSchool.com
Could need a patch I haven’t got around to that yet. I am using Domain service accounts on FT View SE version 11. This system also uses Transaction Manager and to connect that to SQL I had to enter the Windows credentials into a service. Is that what you have to do here or should I be able to enter the Windows credentials into the dialog box for setting up database connections within View Studio.
Good afternoon @Garrett James,
I’ll have to defer to the product documentation as I don’t currently have a domain running here in my office.
Sincerely,
Shawn Tierney
Instructor at http://www.TheAutomationSchool.com
Hi,
I’m trying to view the alarm log files from a client computer in a distributed network and the client computer is not able to connect to the database to show me the alarm history.
But, I have no problems viewing the alarm log in the FTView server computer. What am I missing?
TIA
Good morning @Hemanth Kumar,
When you say “trying to view the alarm log files from a client computer in a distributed network” what are you using to view these alarm log files – like what object on the display isn’t working?
Sincerely,
Shawn Tierney
Instructor at http://www.TheAutomationSchool.com
Why can’t I connect to my FactoryTalk Alarm and Events Database? This description of the problem nailed it for me. Thankyou
You’re very welcome @Daryl Saitz,
Shawn Tierney
Instructor at http://www.TheAutomationSchool.com
Join my free community to follow along! You can also become a member and support our work at: Automation.Locals.com