Pswrd contains # character as starting and ending character

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Pswrd contains # character as starting and ending character

Post by Pravenai »

Hi All,

My password is having # as a starting character and as an ending character (e.g. password is like #abcd$#). I am using ODBC connector stage to connect to a SQL Server database.

I am getting below error:
Invalid property value /Connection/Password (CC_StringProperty::getValue, file CC_StringProperty.cpp, line 109)

I tried following things after reading through IBM website:
1) Enclosed password in double quotes and checked ("#abcd$#")
2) Enclosed password in double quotes and escaped special characters in password string ("\#abcd\$\#")
3) Enclosed password in double quotes and escaped special characters in password string except # strings in the start and in the end ("#abcd\$#")

For all the above cases, I get an error message:
ODBC function "SQLConnect" reported: SQLSTATE = 28000: Native Error Code = 18456: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Legacy Driver][SQL Server]Login failed

Password cannot be changed.

Regards,
PR
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The Connectivity Guide for that database should list how you handle that. Well, phooey... this is noted in the Oracle guide but only for column names rather than passwords. I see no such mention in the ODBC guide.

Hopefully someone else has a real answer. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Assuming you know that DataStage uses the # sign to surround parameters, that's just about the worst possible choice for a password.

It is likely faster to actually have the password changed, or get your own separate ID with a compatible password, than if you were to try to convince support to produce a new enhancement or a patch, unless one is already existing.

You may also want to search the knowledge center on "password naming restrictions." The results are not specifically for the ODBC stages, however, it outlines many special characters that are not permitted for "All user IDs and passwords."

Good luck!
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When entering the password replace each "#" with "__035__".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... same as what is noted in the Oracle guide for column names it would seem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Post by Pravenai »

Hi Ray,

I replaced # with __035__ and checked but it is still not working. Our password also contains $, I replaced that too with __036__ but still getting same error message.

I am connecting to a MSSQL database using ODBC connector. For another connection, password contained $ but no hash character. This job ran successfully without any modification to password field. I see this problem arising only when we have a hash character.

Unfortunately, this database is from a third party and we have no control over the password.

Is there any work around?

Regards,
PK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Check with your official support provider.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Post by Pravenai »

Just a correction to above post.

For the successful connection, we do have # character in the password. Password is something like $#abcd#$. This job connects to MYSQL without any modification required in password field.

It is only when password starts and ends with a #, we face this issue. We do know datastage uses ## to identify parameters, however password is set by some other team and we have no control over that.

Regards,
PR
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perhaps you could supply the password as a job parameter, and have the value of the job parameter itself begin and end with "#" characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply