views:

42

answers:

1

Hi,

I need to do bulk inserts/updates/deletes on a table-by-table basis via JDBC. Database is Sybase.

Because of FK checks, I can't do this, because I temporarily violate integrity.

In MySQL I can easily turn off and on constraint checks, by issuing a simple command.

Is there some way to do the same in Sybase?

Thanks.

+1  A: 

It is standard where I work to break up the DDL into Table, Constraints, and then Indexes; each element only calling CREATE if the object didn't exist. You could create a stored procedure that drops key constraints, and then simply run the DDL after you are done with your bulk insert/update/delete.

Meiscooldude
can the DLL stuff AND the bulk stuff get done in a single transaction?
Thommy
No - DDL is outside transaction
Mark
"ddl in tran" is a Sybase (ASE) option.
Loxley