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:

 

ftae-issue-4

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)…

ftae-issue-5

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:

ftae-issue-6

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:

ftae-issue-7

And to my surprise it wasn’t:

ftae-issue-8

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:

ftae-issue-9

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.

Sincerely,

Shawn Tierney
Automation Instructor and Blogger (post views: 8,034 views)

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

Avatar


Click HERE to scroll down to view or leave comments


10 Blog Comments

  1. Why can’t I connect to my FactoryTalk Alarm and Events Database? This description of the problem nailed it for me. Thankyou

  2. 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

    • 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.

  3. 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)?

Leave A Blog Reply Here

Please enter your blog comment!
Please enter your name here