Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reconnect DB

25 views
Skip to first unread message

Goya

unread,
May 25, 2003, 5:20:53 AM5/25/03
to
In my application, a global connection (gtrx_connection) is used to connect
the a SYBASE server for operations.

To resolve the SYBASE server reboot issue, the following logic has been
built in my front-end application.

If the application has connected the SYBASE server using gtrx_connection,
and the application is ideal. The this moment, the SYBASE server is
restarted.

And now, front-end application is used, and try to retrieve data from
SYBASE server, I have the following logic to handle this problem.

Disconnect using gtrx_connection;
Destroy gtrx_connection

gtrx_connection = Create transaction
Set transaction information
Connect using gtrx_connection;
<- Upon this point, the error "Ct_close(CS_UNUSED), user api layer:
enternal error: The connection has been marked dead" will prompted.

However, if the statement "Connect using gtrx_connection;" is runned again,
the connection success.

Does anyone know the reason, why the first time connection is fail?

steve_katz_[teamsybase]

unread,
Jun 4, 2003, 11:34:29 AM6/4/03
to

After the disconnect, try checking the gtrx_connection.SQLCode and
SQLErrText just to see what it says - if it gives you any hints.

Are you sure you are not trying to reconnect before the server has come
back up and is ready for connections?

Have you tried running a db trace (adding "Trace" before your DBMS value in
the DBMS attribute of the transaction object (e.g. "SYC ..." becomes "Trace
SYC ..."). The trace log will sometimes give you additional information
that is not presented in the error messasge(s).

You shouldn't need to destroy, recreate, and reset the attributes of the
transaction object. Just a disconnect and connect should be sufficient.
This shouldn't affect what you're experiencing, but it is more efficient.

Also, is there some reason you are not using SQLCA? This shouldn't affect
what you're experiencing, but just curious.

steve
[TeamSybase]

0 new messages