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.
Enjoy the benefits of membership! Patreon.com/automation
Check out my affordable courses: TheAutomationSchool.com
Ask me questions by clicking here to go to the comments link
Have an industrial automation news tip? Share it with us here
Click HERE to scroll down to view or leave comments