1

I am not sure whether I should post this here or in Java's related site but because the error is a bit technical and Java developers may not know about it I thought this is the right place.

So the user that we are using to connect to Sybase database has default database set to tempdb, when persisting some of Hibernate entities (for which Hibernate produces simple 'insert' statement) we get this error:

org.springframework.orm.jpa.JpaSystemException: com.sybase.jdbc4.jdbc.SybSQLException: An attempt was made to startup a multi-database update in database 'MY_DATABASE_NAME' after starting up the master transaction in a temporary database. This could render the database 'MY_DATABASE_NAME' unrecoverable and this update is therefore not allowed. ; nested exception is org.hibernate.HibernateException: com.sybase.jdbc4.jdbc.SybSQLException: An attempt was made to startup a multi-database update in database 'MY_DATABASE_NAME' after starting up the master transaction in a temporary database. This could render the database 'MY_DATABASE_NAME' unrecoverable and this update is therefore not allowed

I put the entire error message in above paragraph for others who may encounter this issue but the actual error you may be interested is:

An attempt was made to startup a multi-database update in database 'MY_DATABASE_NAME' after starting up the master transaction in a temporary database. This could render the database 'MY_DATABASE_NAME' unrecoverable and this update is therefore not allowed.

If we change the default database for that user to 'master' everything is fine but my question is: if the default database is tempdb why do only some tables (Hibernate entities) have this problem and inserting for the rest is working fine?

We compared the definition of the tables that have problem with those that don't and found absolutely no difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.