Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004

    Unanswered: No dbh returned from DBI->connect (Perl/Sybase)

    Now I realise this is the Sybase forum, and there is a Perl/DBI forum
    but I believe the problem to be Sybase related, and if nothing else
    perhaps you guys can suggest some way for me to trace/debug
    whats going wrong from the Sybase side ...

    I have installed the latest Perl (5.8.3) from Activestate and (personal)
    Sybase ASE 12.5 on Windows XP, as well as the Sybase Client files &

    And although I've managed to get Java to connect and talk to Sybase,
    it seems the Perl/Sybase connection is proving more tricky than

    I've run ppm and installed both DBI and DBD:ybase for Perl and used
    this code to connect :

    use DBI;
    use DBD:ybase;

    my $host = 'localhost';
    my $db = 'SYBSRV01';
    my $db_username = 'dev';
    my $db_password = 'dev';
    my $dsn = "dbiybase:server=SYBSRV01";

    print "Before connect\n";

    $dbh = undef;
    $dbh = DBI->connect($dsn, $db_username, $db_password);

    print "Please print me, go on - be nice\n";

    # it never gets this far


    Now - the Perl actually connects to Sybase, as I can see the
    connection by using "sp_who dev" on Sybase - and as you
    would expect its "AWAITING COMMAND". But control is never
    passed back to Perl as no dbh (database handle) is returned,
    and the program justs hangs there at the 'DBI->connect' point.
    No idea why Sybase won't return a db handle and there is
    virtually no documentation on what to do if the db-handle is
    not returned

    I'm completely stumped as to why this might be, I've turned
    off (and even uninstalled ZoneAlarm in case there was any port
    protection) but no joy.

    Has anyone had this problem and solved it or could suggest
    anything I might do to further investigate this issue ?

    Thought about perhaps using a previous version of Sybase,
    say 12.0.

    if so I'd be very grateful


  2. #2
    Join Date
    Nov 2002
    What happens if you try to execute a command , like sp_who or select * from a table, just before print statement? Does it give you the output?

  3. #3
    Join Date
    May 2004


    It still doesn't get past that point

  4. #4
    Join Date
    Jan 2005
    Hi. Did you find a solution to this problem? I am having the same issue and am stumped as to what is causing it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts