SQL log in failed

Hi everyone,

I’m using database transaction to connect to sql server using Windows Authentication, it is working when running in studio but when i run it in orchestrator it failed with an error: Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’.
Here is my connection string: “Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=True;Encrypt=False”

@Rolando_Tan,

It could be due to the bot machine where you are trying to run the bot don’t have DB access with that machines Windows user.

Check the access for that user id.

Thanks,
Ashok :slight_smile:

Hi @ashokkarale

Thanks for replying.

The machine has Windows access to the database, and it’s also where I execute the process using Studio with successful outcomes. However, when I attempt to run the process through Orchestrator, it encounters the aforementioned error.

What else should I check?

Regards,
JR

@Rolando_Tan,

Try changing this Encrypt=False to Encrypt=True

@ashokkarale

Okay ill try your recommendation and will get back.

Thank you!

This usually happens because when BOT run via an unattended user then it login as the window service user
You need to use the SQL Server Authentication User Using User Name (SA) and Password

Hello @Everyone,

I managed to fix the issue where the robot cannot connect to sql database using windows authentication.
FIX: used connect to database activity instead of StartTransactions and changed the connection string IntegratedSecurty=True to SSPI

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.