cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How do I deal with COMMIT failing on SQLCODE -660?

Breck_Carter
Participant
3,717

How do I deal with the situation where a COMMIT raises the following exception?

SQLCODE = -660 "SQLE_OMNI_REMOTE_ERROR"
SQLSTATE = WO005
ERRORMSG() = Server 'p003': [Sybase][ODBC Driver][SQL Anywhere]Database server not found

Presumably, something has gone wrong with a connection to a remote server, but that's not the problem...

In this case, there were no outstanding updates on the remote server, but there WERE outstanding updates on the local database and that's what the COMMIT was intended for. (sadly, I don't know whether the local updates were lost or committed)

How do I prevent a problem with a remote server from adversely affecting a transaction on the local database? Is there some way to execute a local COMMIT that ignores any connections to remote servers?

If it can't be prevented, how should it be dealt with? Is there some way to code an EXCEPTION handler that successfully re-issues the COMMIT? (assume the remote server connection is no longer important)

Does the automatic commit associated with ALTER SERVER CONNECTION CLOSE come before or after the remote connection is closed?

Accepted Solutions (0)

Answers (0)