RiotTown has asked for the wisdom of the Perl Monks concerning the following question:

We have a situation where we have a linux box connecting to a MSsql 7 database. This works fine for the most part, but we currently are running into a wierd scenaro that I believe to be at the fault of using the sybase drivers to connect to MSsql... we have a user that we need to connect as that has a 32 character password. The database accepts this using query analyzer, but fails through any Perl DBI connection, saying that the 'Connection Failed'. Through trial and error we have found that it will only connect with passwords up to 29 characters in length. Any ideas for a workaround if the password length cannot be shortened?

Replies are listed 'Best First'.
Re: DBD::Sybase with MSsql issue
by derby (Abbot) on Aug 21, 2002 at 12:44 UTC
    Hmmm ...

    I'm assuming you built DBD::Sybase on top of the Sybase Open Client libs. Looking at the the header files, the maximum length of a password is 30 -- from cstypes.h:

    /* ** The maximum password length allowed. */ #define CS_MAX_PASS (CS_INT)(30)

    The freetds library has some comments about fixing this restriction so you could re-build DBD::Sybase on top of the freetds libraries instead. But on all things perl and Sybase, I would follow whatever mpeppler advises.

    -derby

Re: DBD::Sybase with MSsql issue
by mpeppler (Vicar) on Aug 29, 2002 at 08:57 UTC
    If you are not using FreeTDS then I don't think there is any way around this issue (except to again rail at MS for breaking a perfectly fine protocol!).

    Michael