in reply to Re: DBD::Sybase::db prepare failed after nth iteration
in thread DBD::Sybase::db prepare failed after nth iteration

Hi Michael,

Thanks For your above information. Below is the error, what i am getting, while executing the perl script.
"DBD::Sybase::db prepare failed: OpenClient message: LAYER = (6) ORIGI +N = (8) SEVERITY = (5) NUMBER = (1) Message String: ct_connect(): directory service layer: internal direct +ory control layer error: There was an error encountered while binding + to the directory service. Couldn't prepare the query for procedure execution : OpenClient messag +e: LAYER = (6) ORIGIN = (8) SEVERITY = (5) NUMBER = (1) Message String: ct_connect(): directory service layer: internal direct +ory control layer error: There was an error encountered while binding + to the directory service."

And also, this is happened nearly after 150 th excution on one day. the same script when i ran it for next day. it was throwing the same type of error after running thru some 200 th execution.

then, I have introduced 2 more dbh connection with the existing dbh connection. Now it is not throwing any error and the script works faster compared to the Above one.

I am not Sure whether these Approach is fine for that problem.

Please suggest me, if this is the right approach to fix the issue? or Is Anything i need to modify my Script.

Thanks and Regards
perlsen

Replies are listed 'Best First'.
Re^3: DBD::Sybase::db prepare failed after nth iteration
by mpeppler (Vicar) on Nov 16, 2007 at 15:55 UTC
    OK - so that means that DBD::Sybase is trying to open a new connection. Is that done on purpose?

    If that's NOT the case then you should make sure that any $sth really go out of scope or are cleaned up before executing the next call. Maybe consider using the syb_no_child_con option to make sure that DBD::Sybase doesn't attempt to open a second connection if there is already an "active" statement handle on the current $dbh.

    Michael