DB2 connection using Credentials stored as Asset

Hi all,

I’m trying to connect DB2 using credentials stored as an asset, but, when I try to run the SQL query, I receive an error message stating that username and password are wrong.

I first created the connection with static data, following a tutorial contained in a post I found on this forum, then I created the variables to host username & password (I first converted the password to String from SecureString), and then I substituted the static values in the connection string with the variables, but when Itry to run the workflow I get the error described above.

Can you please give me some hints on how to solve the situation?

Thanks a lot in advance;
Franz

Hey @franz.verga

I hope you are not entering a wrong password in the asset & also there is no extra space in the value

Also, Kindly show us how are you converting a SecureString password to a normal String

Thanks
#nK

Hello @franz.verga ,

Plz confirm whether you did the conversion as below . Alos check whether any space added in the Asset while creating in orchestrator

password_String = new System.Net.NetworkCredential(string.Empty, Password).Password

Hi @Nithinkrishna,

No extra spaces both in Username and password. I used an Assign activity, like this:

String = SecureString.ToString

Hi @Rahul_Unnikrishnan,

As I alrady wrote, no extraspaces in the asset creation and I just used an Assign activity using the simple conversion:

PassordString = PasswordSecurString.ToString

@franz.verga it will not work…Need to convert as below.

password_String = new System.Net.NetworkCredential(string.Empty, Password).Password

@Rahul_Unnikrishnan, I know… It was not working that way… Thanks for the help. Now it works!

1 Like

Glad to hear that :slightly_smiling_face:

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